From b3c991ae8f9da6d8eb26f10b3d4ab08587588c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 1 Sep 2020 13:45:24 +0200 Subject: Port from devicePixelRatioF() to devicePixelRatio() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø --- src/testlib/qtest_gui.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/testlib/qtest_gui.h') diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h index d1efde54b1..3368febb87 100644 --- a/src/testlib/qtest_gui.h +++ b/src/testlib/qtest_gui.h @@ -162,12 +162,12 @@ inline bool qCompare(QImage const &t1, QImage const &t2, } if (t1Null && t2Null) return compare_helper(true, nullptr, nullptr, nullptr, actual, expected, file, line); - if (!qFuzzyCompare(t1.devicePixelRatioF(), t2.devicePixelRatioF())) { + if (!qFuzzyCompare(t1.devicePixelRatio(), t2.devicePixelRatio())) { qsnprintf(msg, 1024, "Compared QImages differ in device pixel ratio.\n" " Actual (%s): %g\n" " Expected (%s): %g", - actual, t1.devicePixelRatioF(), - expected, t2.devicePixelRatioF()); + actual, t1.devicePixelRatio(), + expected, t2.devicePixelRatio()); return compare_helper(false, msg, nullptr, nullptr, actual, expected, file, line); } if (t1.width() != t2.width() || t1.height() != t2.height()) { @@ -204,12 +204,12 @@ inline bool qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, c } if (t1Null && t2Null) return compare_helper(true, nullptr, nullptr, nullptr, actual, expected, file, line); - if (!qFuzzyCompare(t1.devicePixelRatioF(), t2.devicePixelRatioF())) { + if (!qFuzzyCompare(t1.devicePixelRatio(), t2.devicePixelRatio())) { qsnprintf(msg, 1024, "Compared QPixmaps differ in device pixel ratio.\n" " Actual (%s): %g\n" " Expected (%s): %g", - actual, t1.devicePixelRatioF(), - expected, t2.devicePixelRatioF()); + actual, t1.devicePixelRatio(), + expected, t2.devicePixelRatio()); return compare_helper(false, msg, nullptr, nullptr, actual, expected, file, line); } if (t1.width() != t2.width() || t1.height() != t2.height()) { -- cgit v1.2.3