diff options
author | John Layt <jlayt@kde.org> | 2014-01-23 14:44:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-05 19:34:19 +0100 |
commit | 23401a1462ffd601172d17365ff07118f198c438 (patch) | |
tree | bdf459c68c1b3550ffcc100b81ee00adc2c99983 /src | |
parent | 10f3c2bca60362b1268b64ea743cb66ae05bfe14 (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')
-rw-r--r-- | src/plugins/platforms/cocoa/qprintengine_mac.mm | 21 | ||||
-rw-r--r-- | src/printsupport/kernel/qprinter.cpp | 4 |
2 files changed, 10 insertions, 15 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; diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index 86985fa7ca..496883f44b 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -938,11 +938,9 @@ QPrinter::Orientation QPrinter::orientation() const The printer driver reads this setting and prints using the specified orientation. - On Windows, this option can be changed while printing and will + On Windows and Mac, this option can be changed while printing and will take effect from the next call to newPage(). - On Mac OS X, changing the orientation during a print job has no effect. - \sa orientation() */ |