From 5c778aba1acfedee1e14d1a7cb08dd4268928044 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sun, 23 Oct 2016 12:19:50 +0200 Subject: [PATCH] Update the TST_VPoster after changes in VPoster --HG-- branch : feature --- src/test/ValentinaTest/tst_vposter.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/ValentinaTest/tst_vposter.cpp b/src/test/ValentinaTest/tst_vposter.cpp index b2c4ccaa1..da7556904 100644 --- a/src/test/ValentinaTest/tst_vposter.cpp +++ b/src/test/ValentinaTest/tst_vposter.cpp @@ -50,6 +50,15 @@ void TST_VPoster::BigPoster() printer.setFullPage(true); // We need to set full page because otherwise QPrinter->pageRect returns different values in Windows and Linux + //sets the margins to 0 to perform the test. + const qreal left = 0, top = 0, right = 0, bottom = 0; +#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0) + printer.setPageMargins(QMarginsF(left, top, right, bottom), QPageLayout::Millimeter); +#else + printer.setPageMargins(left, top, right, bottom, QPrinter::Millimeter); +#endif //QT_VERSION >= QT_VERSION_CHECK(5, 3, 0) + + const QRect image(0, 0, 2622, 3178); // Little bit bigger than A1 VPoster posterazor(&printer); const QVector poster = posterazor.Calc(image, 0);