From 999f62531a784b8f0f1f6d3cb7aaaa5455485d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 23 Jul 2020 11:41:06 +0200 Subject: testlib: Set AA_UseHighDpiPixmaps false for low-DPI tests Change-Id: I129118c303527e4aff25c4d5326eefa43c231d44 Reviewed-by: Volker Hilsheimer --- src/testlib/qtest.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/testlib/qtest.h') 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 -- cgit v1.2.3