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>
This commit is contained in:
Tor Arne Vestbø 2020-08-28 11:23:17 +02:00
parent da9a57a1e6
commit 756d7facf6

View File

@ -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; }
};