summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index ea13995..09d6b26 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -577,15 +577,22 @@ void tst_QPrinter::outputFormatFromSuffix()
void tst_QPrinter::setGetPaperSize()
{
- QPrinter p;
- p.setOutputFormat(QPrinter::PdfFormat);
- QSizeF size(500, 10);
- p.setPaperSize(size, QPrinter::Millimeter);
- QCOMPARE(p.paperSize(QPrinter::Millimeter), size);
- QSizeF ptSize = p.paperSize(QPrinter::Point);
- //qDebug() << ptSize;
- QVERIFY(qAbs(ptSize.width() - size.width() * (72/25.4)) < 1E-4);
- QVERIFY(qAbs(ptSize.height() - size.height() * (72/25.4)) < 1E-4);
+ {
+ QPrinter p;
+ p.setOutputFormat(QPrinter::PdfFormat);
+ QSizeF size(500, 10);
+ p.setPaperSize(size, QPrinter::Millimeter);
+ QCOMPARE(p.paperSize(QPrinter::Millimeter), size);
+ QSizeF ptSize = p.paperSize(QPrinter::Point);
+ //qDebug() << ptSize;
+ QVERIFY(qAbs(ptSize.width() - size.width() * (72/25.4)) < 1E-4);
+ QVERIFY(qAbs(ptSize.height() - size.height() * (72/25.4)) < 1E-4);
+ }
+ {
+ QPrinter p;
+ p.setPaperSize(QPrinter::Legal);
+ QCOMPARE(p.paperSize(), QPrinter::Legal);
+ }
}
void tst_QPrinter::testPageMargins_data()