Fix tst_QPrinter::doubleSidedPrinting() test and remove from blacklist

Change-Id: If96471ed3324795086c5ff951d9332a0e82870ea
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This commit is contained in:
Andy Shaw 2015-11-06 16:00:56 +01:00 committed by Frederik Gladhorn
parent 7a42c8c15c
commit bf517c22f6
2 changed files with 4 additions and 7 deletions

View File

@ -1,3 +0,0 @@
[doubleSidedPrinting]
windows 32bit msvc-2013

View File

@ -1090,12 +1090,12 @@ void tst_QPrinter::doubleSidedPrinting()
QPrinter native;
if (native.outputFormat() == QPrinter::NativeFormat) {
// Test default
QPrinterInfo printerInfo;
QPrinterInfo printerInfo(native);
bool expected = (printerInfo.defaultDuplexMode() != QPrinter::DuplexNone);
QCOMPARE(native.doubleSidedPrinting(), false);
QCOMPARE(native.doubleSidedPrinting(), expected);
// Test set/get
expected = (printerInfo.supportedDuplexModes().count() > 1);
// Test set/get, changing the expected value if possible
expected = expected ? false : (printerInfo.supportedDuplexModes().count() > 1);
native.setDoubleSidedPrinting(expected);
QCOMPARE(native.doubleSidedPrinting(), expected);