summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtest_gui.h
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2020-09-01 13:45:24 +0200
committerMorten Johan Sørvig <morten.sorvig@qt.io>2020-09-10 17:28:11 +0200
commitb3c991ae8f9da6d8eb26f10b3d4ab08587588c9e (patch)
tree8f2ff32cadf9b8733701b8f99229a6135f53f7d7 /src/testlib/qtest_gui.h
parente1ce78d48498a3de21fe4714e92e2c0fcf1a0813 (diff)
Port from devicePixelRatioF() to devicePixelRatio()
This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/testlib/qtest_gui.h')
-rw-r--r--src/testlib/qtest_gui.h12
1 files changed, 6 insertions, 6 deletions
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()) {