summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qprintengine_mac.mm
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2014-01-23 14:44:45 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-05 19:34:19 +0100
commit23401a1462ffd601172d17365ff07118f198c438 (patch)
treebdf459c68c1b3550ffcc100b81ee00adc2c99983 /src/plugins/platforms/cocoa/qprintengine_mac.mm
parent10f3c2bca60362b1268b64ea743cb66ae05bfe14 (diff)
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 <lars.knoll@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qprintengine_mac.mm')
-rw-r--r--src/plugins/platforms/cocoa/qprintengine_mac.mm21
1 files changed, 9 insertions, 12 deletions
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;