Skip to content

Commit

Permalink
Fix tst_QPrinter::doubleSidedPrinting() test and remove from blacklist
Browse files Browse the repository at this point in the history
Change-Id: If96471ed3324795086c5ff951d9332a0e82870ea
Reviewed-by: Jędrzej Nowacki <[email protected]>
  • Loading branch information
Andy Shaw authored and gladhorn committed Nov 6, 2015
1 parent 7a42c8c commit bf517c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions tests/auto/printsupport/kernel/qprinter/BLACKLIST

This file was deleted.

8 changes: 4 additions & 4 deletions tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bf517c2

Please sign in to comment.