diff options
author | John Layt <jlayt@kde.org> | 2014-01-17 16:16:31 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-05 19:33:59 +0100 |
commit | 27c33a8f7a9469fd8b55de62b11e0b6b868636c5 (patch) | |
tree | 6b599ed8d6177c34edd73359256550730ae4bc9c /src/plugins/platforms/cocoa/qprintengine_mac.mm | |
parent | 0ee72b09fd99b756a85de78bafb03c7dee163ef5 (diff) |
QPrintEngne - Fix PPK_Creator
Add support to the Mac and Windows print engines to preserve the
creator name when switching between native and pdf format.
Change-Id: Ie036af3140f24d8e34aa886f091384f93aa0157b
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.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qprintengine_mac.mm b/src/plugins/platforms/cocoa/qprintengine_mac.mm index b11afc745e..48af06ec02 100644 --- a/src/plugins/platforms/cocoa/qprintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qprintengine_mac.mm @@ -607,9 +607,6 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va // The following keys are settings that are unsupported by the Mac PrintEngine case PPK_ColorMode: break; - case PPK_Creator: - // TODO Add value preservation support by using local variable - break; case PPK_CustomBase: break; case PPK_Duplex: @@ -662,6 +659,9 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va case PPK_CollateCopies: PMSetCollate(d->settings(), value.toBool()); break; + case PPK_Creator: + d->m_creator = value.toString(); + break; case PPK_DocumentName: PMPrintSettingsSetJobName(d->settings(), QCFString(value.toString())); break; @@ -759,9 +759,6 @@ QVariant QMacPrintEngine::property(PrintEnginePropertyKey key) const case PPK_ColorMode: ret = QPrinter::Color; break; - case PPK_Creator: - ret = QString(); - break; case PPK_CustomBase: // Special case, leave null break; @@ -804,6 +801,9 @@ QVariant QMacPrintEngine::property(PrintEnginePropertyKey key) const ret = bool(status); break; } + case PPK_Creator: + ret = d->m_creator; + break; case PPK_DocumentName: { CFStringRef name; PMPrintSettingsGetJobName(d->settings(), &name); |