From 23401a1462ffd601172d17365ff07118f198c438 Mon Sep 17 00:00:00 2001 From: John Layt Date: Thu, 23 Jan 2014 14:44:45 +0100 Subject: QPrinter - Enable changing of Orientation on Mac Since OSX 10.4 it has been possible to change the page orientation during a print job. Task-number: QTBUG-27630 Change-Id: Ic3c69e83afebbb9267ef6f435f968aeef2b72963 Reviewed-by: Lars Knoll --- src/plugins/platforms/cocoa/qprintengine_mac.mm | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/plugins/platforms/cocoa/qprintengine_mac.mm') diff --git a/src/plugins/platforms/cocoa/qprintengine_mac.mm b/src/plugins/platforms/cocoa/qprintengine_mac.mm index 48af06ec02..3e92a45a62 100644 --- a/src/plugins/platforms/cocoa/qprintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qprintengine_mac.mm @@ -673,18 +673,15 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va PMSetCopies(d->settings(), value.toInt(), false); break; case PPK_Orientation: { - if (d->state == QPrinter::Active) { - qWarning("QMacPrintEngine::setOrientation: Orientation cannot be changed during a print job, ignoring change"); - } else { - QPrinter::Orientation newOrientation = QPrinter::Orientation(value.toInt()); - if (d->hasCustomPaperSize && (d->orient != newOrientation)) - d->customSize = QSizeF(d->customSize.height(), d->customSize.width()); - d->orient = newOrientation; - PMOrientation o = d->orient == QPrinter::Portrait ? kPMPortrait : kPMLandscape; - PMSetOrientation(d->format(), o, false); - PMSessionValidatePageFormat(d->session(), d->format(), kPMDontWantBoolean); - } - break; } + QPrinter::Orientation newOrientation = QPrinter::Orientation(value.toInt()); + if (d->hasCustomPaperSize && (d->orient != newOrientation)) + d->customSize = QSizeF(d->customSize.height(), d->customSize.width()); + d->orient = newOrientation; + PMOrientation o = d->orient == QPrinter::Portrait ? kPMPortrait : kPMLandscape; + PMSetOrientation(d->format(), o, false); + PMSessionValidatePageFormat(d->session(), d->format(), kPMDontWantBoolean); + break; + } case PPK_OutputFileName: d->outputFilename = value.toString(); break; -- cgit v1.2.3