From 5af95d077bc7bcb1633d81686d324d167746040b Mon Sep 17 00:00:00 2001 From: John Layt Date: Fri, 17 Jan 2014 16:45:18 +0100 Subject: QPrinter - Fix Printer Selection option on Windows Make the printer selection option api public on Windows to be consistent with Mac, and with the print program api which is already public. Change-Id: I3da9684288348eaa43276ca8534a1d5809f7027b Reviewed-by: Lars Knoll --- tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp') diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp index d3ccb229fc..9571cb4110 100644 --- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp +++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp @@ -1643,10 +1643,9 @@ void tst_QPrinter::printerSelectionOption() // printerSelectionOption() / setPrinterSelectionOption() / PPK_SelectionOption // PdfFormat: Supported // NativeFormat, Cups: Supported - // NativeFormat, Win: Unsupported, ifdef'd out TODO remove ifdef, always QString() + // NativeFormat, Win: Unsupported, always QString() // NativeFormat, Mac: Unsupported, always QString() -#ifndef Q_OS_WIN QPrinter pdf; pdf.setOutputFormat(QPrinter::PdfFormat); QCOMPARE(pdf.printerSelectionOption(), QString()); @@ -1661,9 +1660,9 @@ void tst_QPrinter::printerSelectionOption() // Test set/get QString expected = QStringLiteral("Optional option"); native.setPrinterSelectionOption(expected); -#ifdef Q_OS_MAC +#if defined Q_OS_MAC || defined Q_OS_WIN expected.clear(); -#endif // Q_OS_MAC +#endif // Q_OS_MAC || Q_OS_WIN QCOMPARE(native.printerSelectionOption(), expected); // Test value preservation @@ -1674,7 +1673,6 @@ void tst_QPrinter::printerSelectionOption() } else { QSKIP("No printers installed, cannot test NativeFormat, please install printers to test"); } -#endif // Q_OS_WIN } void tst_QPrinter::resolution() -- cgit v1.2.3