From 95630570aa473c9fc2c6986b0a6b0185f376319d Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sun, 18 Dec 2016 22:01:28 +0100 Subject: [PATCH] fix minor compile problems Change-Id: Ic4992b6aef3d0bf9a079e8d598bfff64748e6200 --- Makefile | 1 + commonlib/templates/labeldlg.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 650b88c..9904e4b 100644 --- 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 diff --git a/commonlib/templates/labeldlg.cpp b/commonlib/templates/labeldlg.cpp index d4aab61..4d6c6e7 100644 --- a/commonlib/templates/labeldlg.cpp +++ b/commonlib/templates/labeldlg.cpp @@ -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 -- 1.7.2.5