diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-01-19 13:49:52 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-01-21 11:10:14 +0100 |
commit | b6191b16d41459ed73cea738dfaf8e25e81ae22b (patch) | |
tree | 6ad0952af507bf1ab8df9612023d6e224db8d7e2 /tests/auto/printsupport/kernel | |
parent | b2883a6acc7a8d8372a815cc91dd1a8449f25723 (diff) | |
parent | 9087df6bd2dd5198ccf101a237aadee331e51ec3 (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
src/corelib/global/global.pri
src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.h
src/corelib/tools/qdatetime.cpp
src/plugins/platforms/xcb/qxcbscreen.h
src/plugins/platforms/xcb/qxcbwindow.h
src/widgets/dialogs/qcolordialog.cpp
src/widgets/dialogs/qcolordialog_p.h
tools/configure/configureapp.cpp
Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
Diffstat (limited to 'tests/auto/printsupport/kernel')
-rw-r--r-- | tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp index 78aa0af43d..62bd9828ba 100644 --- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp +++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp @@ -526,7 +526,7 @@ void tst_QPrinter::testCustomPageSizes() { QPrinter p; - QSizeF customSize(8.5, 11.0); + QSizeF customSize(7.0, 11.0); p.setPaperSize(customSize, QPrinter::Inch); QSizeF paperSize = p.paperSize(QPrinter::Inch); @@ -538,6 +538,16 @@ void tst_QPrinter::testCustomPageSizes() paperSize = p.paperSize(QPrinter::Inch); QCOMPARE(paperSize.width(), customSize.width()); QCOMPARE(paperSize.height(), customSize.height()); + + const QSizeF sizeInPixels = p.paperSize(QPrinter::DevicePixel); + QPrinter p3; + p3.setPaperSize(sizeInPixels, QPrinter::DevicePixel); + paperSize = p3.paperSize(QPrinter::Inch); + QCOMPARE(paperSize.width(), customSize.width()); + QCOMPARE(paperSize.height(), customSize.height()); + QPageSize pageSize = p3.pageLayout().pageSize(); + QCOMPARE(pageSize.key(), QString("Custom.504x792")); + QCOMPARE(pageSize.name(), QString("Custom (504pt x 792pt)")); } void tst_QPrinter::customPaperSizeAndMargins_data() |