fix minor compile problems
authorKonrad Rosenbaum <konrad@silmor.de>
Sun, 18 Dec 2016 21:01:28 +0000 (22:01 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Sun, 18 Dec 2016 21:01:28 +0000 (22:01 +0100)
Change-Id: Ic4992b6aef3d0bf9a079e8d598bfff64748e6200

Makefile
commonlib/templates/labeldlg.cpp

index 650b88c..9904e4b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -112,6 +112,7 @@ client: wob taurus tzone wbase
        cd mainapp && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
        cd sessman && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
        cd adminapp && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
+       cd printathome && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
        cd plugins && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
 
 winclient: COPY=copy /y
index d4aab61..4d6c6e7 100644 (file)
@@ -557,7 +557,7 @@ bool MLabelConfig::configurePrinter(QPrinter&prn ) const
        mr=set.value("marginRight").toDouble();
        mb=set.value("marginBottom").toDouble();
        mt=set.value("marginTop").toDouble();
-       prn.setPageMargins(QMarginsF(ml,mr,mb,mt),QPrinter::Millimeter);
+       prn.setPageMargins(QMarginsF(ml,mr,mb,mt),QPageLayout::Millimeter);
        prn.setDuplex(QPrinter::DuplexMode(set.value("duplex",QPrinter::DuplexAuto).toInt()));
        prn.setOrientation((set.value("orientation","portrait").toString()=="portrait")?QPrinter::Portrait:QPrinter::Landscape);
         if(set.contains("resolution"))
@@ -578,7 +578,7 @@ void MLabelConfig::storePrinter(QPrinter& prn)
 #endif
        //qreal ml,mr,mt,mb;
        //prn.getPageMargins(&ml,&mr,&mb,&mt,QPrinter::Millimeter);
-       QMarginsF marg=prn.pageLayout().margins(QPrinter::Millimeter);
+       QMarginsF marg=prn.pageLayout().margins(QPageLayout::Millimeter);
        set.setValue("marginLeft",marg.left());
        set.setValue("marginRight",marg.right());
        set.setValue("marginBottom",marg.bottom());
@@ -736,7 +736,7 @@ MLabelPrintDialog::MLabelPrintDialog(QPrinter* prn, QWidget* parent, Qt::WindowF
         QGridLayout*gl;
         fl->addRow(tr("Margins:"),gl=new QGridLayout);
         //qreal ml,mr,mt,mb;
-       QMarginsF marg=mprinter->pageLayout().margins(QPrinter::Millimeter);
+       QMarginsF marg=mprinter->pageLayout().margins(QPageLayout::Millimeter);
         //mprinter->getPageMargins(&ml,&mt,&mr,&mb,QPrinter::Millimeter);
         gl->addWidget(mmargtop=new QDoubleSpinBox,0,1);
         mmargtop->setValue(marg.top()/moldunit);
@@ -858,7 +858,7 @@ void MLabelPrintDialog::okBtnPressed()
         mprinter->setPaperSize(QPrinter::PaperSize(mpaper->itemData(mpaper->currentIndex()).toInt()));
         mprinter->setPageSizeMM(QSizeF(msizex->value()*moldunit,msizey->value()*moldunit));
         //mprinter->setPageMargins(mmargleft->value()*moldunit, mmargtop->value()*moldunit, mmargright->value()*moldunit, mmargbottom->value()*moldunit, QPrinter::Millimeter);
-        mprinter->setPageMargins(QMarginsF(mmargleft->value()*moldunit, mmargtop->value()*moldunit, mmargright->value()*moldunit, mmargbottom->value()*moldunit), QPrinter::Millimeter);
+        mprinter->setPageMargins(QMarginsF(mmargleft->value()*moldunit, mmargtop->value()*moldunit, mmargright->value()*moldunit, mmargbottom->value()*moldunit), QPageLayout::Millimeter);
         mprinter->setResolution(mresolution->itemData(mresolution->currentIndex()).toInt());
         
         //close the dialog