summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-08-28 11:23:17 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-08-28 13:00:05 +0200
commit756d7facf6c862faea1fdeadafba361f248328cf (patch)
treebc023e4fa442bd2adf9ca99ca47902fc5b0fa289 /tests
parentda9a57a1e6b3b227ce3c4030d8e6f4e6c43f0643 (diff)
Fix tst_QHighDpiScaling::scale
Without an override for logicalDpi() the base class implementation would use the geometry of the screen to figure out the DPI, and end up with ~100, which combined with a 96DPI base logical DPI would give a wrong scale factor. Change-Id: I68aecce44d2ee672c7b707dfe5444af8f551e961 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/kernel/qhighdpiscaling/tst_qhighdpiscaling.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qhighdpiscaling/tst_qhighdpiscaling.cpp b/tests/auto/gui/kernel/qhighdpiscaling/tst_qhighdpiscaling.cpp
index ec80c2d02c..3fbaa0715a 100644
--- a/tests/auto/gui/kernel/qhighdpiscaling/tst_qhighdpiscaling.cpp
+++ b/tests/auto/gui/kernel/qhighdpiscaling/tst_qhighdpiscaling.cpp
@@ -47,6 +47,8 @@ public:
QRect geometry() const override { return QRect(3840, 0, 3840, 1920); }
QRect availableGeometry() const override { return geometry(); }
+ QDpi logicalDpi() const override { return logicalBaseDpi(); }
+
int depth() const override { return 32; }
QImage::Format format() const override { return QImage::Format_ARGB32_Premultiplied; }
};