From 5add30c8cabea326f67564e41060a5c0fec6acd7 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Fri, 25 Sep 2020 17:08:27 +0200 Subject: QPrinter: unit tests fail when default printer supports duplex When the default printer supports a duplex mode other than DuplexAuto, the unit tests change to QPrinter::PdfFormat and expect that the pdf printer is in duplex mode then. However, the pdf printer does not support duplex mode. This patch removes this check. Change-Id: If394f9f23fd244713bbb1ecce9d3802cbd281d90 Reviewed-by: Andy Shaw --- tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/auto/printsupport/kernel') diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp index 81a53bd6b6..fc65df108a 100644 --- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp +++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp @@ -937,11 +937,10 @@ void tst_QPrinter::duplex() native.setDuplex(expected); QCOMPARE(native.duplex(), expected); - // Test value preservation + // Test that PdfFormat printer has no duplex. native.setOutputFormat(QPrinter::PdfFormat); - QCOMPARE(native.duplex(), expected); + QCOMPARE(native.duplex(), QPrinter::DuplexNone); native.setOutputFormat(QPrinter::NativeFormat); - QCOMPARE(native.duplex(), expected); // Test setting invalid option if (!printerInfo.supportedDuplexModes().contains(QPrinter::DuplexLongSide)) { -- cgit v1.2.3