diff options
author | John Layt <jlayt@kde.org> | 2013-11-29 15:54:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-05 19:33:50 +0100 |
commit | 27473f19bb26b5b4434689c663d483e48b43fdef (patch) | |
tree | 7bc04d3d93a779759cc47d25d03f30021543b43e /tests/auto/printsupport | |
parent | 053bee8b80f4f987718c6633b831a58eb231b599 (diff) | |
download | qtbase-27473f19bb26b5b4434689c663d483e48b43fdef.tar.gz |
QPrintEngine - Fix PPK_DocumentName
Add support to the Mac print engine for set/get the Document Name using
the Job Name setting. Our documentation states this is one use that the
document name will be put to so is appropriate to be used.
Change the Windows print engine to default to a blank Docuemnt Name
consistent with the other print engines. If still blank when printing
then use a default value.
Task-number: QTBUG-27724
Task-number: QTBUG-22144
Change-Id: If590811b5720e6f759eabc290b578b94e221f9f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/printsupport')
-rw-r--r-- | tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp index 37aa7b2a16..322254602d 100644 --- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp +++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp @@ -1107,8 +1107,8 @@ void tst_QPrinter::docName() // docName() / setDocName() / PPK_DocumentName // PdfFormat: Supported, default QString() // NativeFormat, Cups: Supported, default QString() - // NativeFormat, Win: Supported, default "document1" - // NativeFormat, Mac: Unsupported, always QString() + // NativeFormat, Win: Supported, default QString() + // NativeFormat, Mac: Supported, default QString() QPrinter pdf; pdf.setOutputFormat(QPrinter::PdfFormat); @@ -1119,18 +1119,11 @@ void tst_QPrinter::docName() QPrinter native; if (native.outputFormat() == QPrinter::NativeFormat) { // Test default -#ifdef Q_OS_WIN - QCOMPARE(native.docName(), QString("document1")); -#else QCOMPARE(native.docName(), QString()); -#endif // Q_OS_WIN // Test set/get QString expected = QStringLiteral("Test Name"); native.setDocName(expected); -#ifdef Q_OS_MAC - expected.clear(); -#endif // Q_OS_MAC QCOMPARE(native.docName(), expected); // Test value preservation |