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>
This commit is contained in:
Andreas Buhr 2020-09-25 17:08:27 +02:00
parent 2f879062a5
commit 5add30c8ca

View File

@ -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)) {