diff options
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qprintengine_mac.mm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/platforms/cocoa/qprintengine_mac.mm b/src/plugins/platforms/cocoa/qprintengine_mac.mm index dd2bd718f6..170eccdd1b 100644 --- a/src/plugins/platforms/cocoa/qprintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qprintengine_mac.mm @@ -615,9 +615,6 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va break; case PPK_CustomBase: break; - case PPK_DocumentName: - // TODO Add support using PMPrintSettingsSetJobName / PMPrintSettingsGetJobName - break; case PPK_Duplex: // TODO Add support using PMSetDuplex / PMGetDuplex break; @@ -665,7 +662,9 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va PMSessionValidatePageFormat(d->session(), d->format(), kPMDontWantBoolean); break; } - + case PPK_DocumentName: + PMPrintSettingsSetJobName(d->settings(), QCFString(value.toString())); + break; case PPK_FullPage: d->fullPage = value.toBool(); break; @@ -770,10 +769,6 @@ QVariant QMacPrintEngine::property(PrintEnginePropertyKey key) const case PPK_CustomBase: // Special case, leave null break; - case PPK_DocumentName: - // TODO Add support using PMPrintSettingsSetJobName / PMPrintSettingsGetJobName - ret = QString(); - break; case PPK_Duplex: // TODO Add support using PMSetDuplex / PMGetDuplex ret = QPrinter::DuplexNone; @@ -807,6 +802,12 @@ QVariant QMacPrintEngine::property(PrintEnginePropertyKey key) const break; // The following keys are properties and settings that are supported by the Mac PrintEngine + case PPK_DocumentName: { + CFStringRef name; + PMPrintSettingsGetJobName(d->settings(), &name); + ret = QCFString::toQString(name); + break; + } case PPK_FullPage: ret = d->fullPage; break; |