summaryrefslogtreecommitdiffstats
path: root/tests/auto/printsupport/kernel
diff options
context:
space:
mode:
authorAndreas Buhr <andreas.buhr@qt.io>2020-09-25 17:08:27 +0200
committerAndreas Buhr <andreas.buhr@qt.io>2020-09-30 11:02:36 +0200
commit5add30c8cabea326f67564e41060a5c0fec6acd7 (patch)
tree07ffbe29eed527fc9bbce575833bb5936020ffaa /tests/auto/printsupport/kernel
parent2f879062a5ce9e78c1e257924bcdc5ac95cba465 (diff)
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 <andy.shaw@qt.io>
Diffstat (limited to 'tests/auto/printsupport/kernel')
-rw-r--r--tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp5
1 files changed, 2 insertions, 3 deletions
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)) {