diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-08-27 17:29:14 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-08-28 22:16:53 +0200 |
commit | 9d2b43de19eebc836683e00ca0516a59cb6abe5d (patch) | |
tree | e116d68826eaa8b068cde23d90bbdcb10851928c /src | |
parent | 1aa412987f9f71232e6ed36d16df8f15efec9903 (diff) |
Use build-system to declare tests that are low-DPI
Change-Id: I6da7204683b3c46232cfc542ed5e28131a82e87d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/testlib/qtest.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h index cd8bd713f7..935fbf9b05 100644 --- a/src/testlib/qtest.h +++ b/src/testlib/qtest.h @@ -64,6 +64,10 @@ #include <QtCore/qurl.h> #include <QtCore/quuid.h> +#if defined(TESTCASE_LOWDPI) +#include <QtCore/qcoreapplication.h> +#endif + #include <QtCore/qpoint.h> #include <QtCore/qsize.h> #include <QtCore/qrect.h> @@ -461,6 +465,7 @@ bool compareSequence(ActualIterator actualIt, ActualIterator actualEnd, #if defined(TESTCASE_LOWDPI) void disableHighDpi() { + QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, false); } Q_CONSTRUCTOR_FUNCTION(disableHighDpi); |