From 78c27380c6b029b7908642b92ea68aca649e2384 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Wed, 28 Dec 2011 21:28:51 +0100 Subject: [PATCH] Fix printerPaperSize and some tst_qprinter test failures Removing QEXPECT_FAIL accordingly. Task-number: QTBUG-22296 Task-number: QTBUG-22562 Change-Id: I128a78897722cc067168ee50dbcbfc7537abdfcd Reviewed-by: Thiago Macieira --- src/printsupport/kernel/qprintengine_pdf.cpp | 2 +- tests/auto/gui/painting/qprinter/tst_qprinter.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/printsupport/kernel/qprintengine_pdf.cpp b/src/printsupport/kernel/qprintengine_pdf.cpp index c8ce2cf..7489d71 100644 --- a/src/printsupport/kernel/qprintengine_pdf.cpp +++ b/src/printsupport/kernel/qprintengine_pdf.cpp @@ -303,7 +303,7 @@ QVariant QPdfPrintEngine::property(PrintEnginePropertyKey key) const ret = d->pageOrder; break; case PPK_PaperSize: - ret = d->paperSize; + ret = d->printerPaperSize; break; case PPK_PaperSource: ret = d->paperSource; diff --git a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp b/tests/auto/gui/painting/qprinter/tst_qprinter.cpp index d7b0ccb..4767048 100644 --- a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp +++ b/tests/auto/gui/painting/qprinter/tst_qprinter.cpp @@ -191,7 +191,6 @@ void tst_QPrinter::getSetCheck() obj1.setPageSize(QPrinter::PageSize(QPrinter::A4)); QCOMPARE(QPrinter::PageSize(QPrinter::A4), obj1.pageSize()); obj1.setPageSize(QPrinter::PageSize(QPrinter::Letter)); - QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort); QCOMPARE(QPrinter::PageSize(QPrinter::Letter), obj1.pageSize()); obj1.setPageSize(QPrinter::PageSize(QPrinter::Legal)); QCOMPARE(QPrinter::PageSize(QPrinter::Legal), obj1.pageSize()); @@ -517,7 +516,6 @@ void tst_QPrinter::setGetPaperSize() p.setOutputFormat(QPrinter::PdfFormat); QSizeF size(500, 10); p.setPaperSize(size, QPrinter::Millimeter); - QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort); QCOMPARE(p.paperSize(QPrinter::Millimeter), size); QSizeF ptSize = p.paperSize(QPrinter::Point); //qDebug() << ptSize; @@ -760,7 +758,6 @@ void tst_QPrinter::valuePreservation() printer.setPageSize(QPrinter::B5); printer.setOutputFormat(newFormat); - QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort); QCOMPARE(printer.pageSize(), QPrinter::B5); printer.setOutputFormat(oldFormat); QCOMPARE(printer.pageSize(), QPrinter::B5); @@ -881,7 +878,6 @@ void tst_QPrinter::testCustomPageSizes() p.setPaperSize(customSize, QPrinter::Inch); QSizeF paperSize = p.paperSize(QPrinter::Inch); - QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort); QCOMPARE(paperSize, customSize); QPrinter p2(QPrinter::HighResolution); -- 2.7.4