diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-23 11:41:06 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-24 12:36:15 +0200 |
commit | 999f62531a784b8f0f1f6d3cb7aaaa5455485d17 (patch) | |
tree | acb6bdf06b6d006898832bde24aab7fe0020ed26 /src/testlib/qtest.h | |
parent | 8361c6252fecf8b95cf06560f852b1e9b5c6b82b (diff) |
testlib: Set AA_UseHighDpiPixmaps false for low-DPI tests
Change-Id: I129118c303527e4aff25c4d5326eefa43c231d44
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/testlib/qtest.h')
-rw-r--r-- | src/testlib/qtest.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h index 0fbef0b7c2..cceefde84a 100644 --- a/src/testlib/qtest.h +++ b/src/testlib/qtest.h @@ -319,6 +319,14 @@ bool compareSequence(ActualIterator actualIt, ActualIterator actualEnd, return compare_helper(isOk, msg, nullptr, nullptr, actual, expected, file, line); } +#if defined(TESTCASE_LOWDPI) +void disableHighDpi() +{ + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, false); +} +Q_CONSTRUCTOR_FUNCTION(disableHighDpi); +#endif + } // namespace Internal template <typename T> |