From 9e26ca82fea9777a338e37a22f055c7e58c3ce5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 10 Sep 2017 15:52:04 +0200 Subject: [PATCH] macOS: Allow tests to mark themselves as not supporting high-DPI Some tests are not written to handle running on a retina screen, resulting in additional test failures when trying to fix a CI test failure on a local retina-enabled machine. Change-Id: I0fed33c38792b686ac83abba2bfbc45623382200 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/testcase.prf | 12 ++++++++++++ mkspecs/macx-clang/Info.plist.disable_highdpi | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 mkspecs/macx-clang/Info.plist.disable_highdpi diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index 8d51c9d028c..3bbaf4575af 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -9,6 +9,18 @@ testcase_exceptions: CONFIG += exceptions # Set in qt_build_config.prf testcase_no_bundle: CONFIG -= app_bundle +# Allow testcases to mark themselves as not supporting high-DPI +testcase_lowdpi { + macos { + !isEmpty(QMAKE_INFO_PLIST): \ + error("QMAKE_INFO_PLIST already set, can't apply testcase_lowdpi") + + QMAKE_INFO_PLIST = $$QMAKESPEC/Info.plist.disable_highdpi + } else { + # TODO: Add support for other platforms if possible + } +} + benchmark: type = benchmark else: type = check diff --git a/mkspecs/macx-clang/Info.plist.disable_highdpi b/mkspecs/macx-clang/Info.plist.disable_highdpi new file mode 100644 index 00000000000..a9b89888ad4 --- /dev/null +++ b/mkspecs/macx-clang/Info.plist.disable_highdpi @@ -0,0 +1,8 @@ + + + + + NSHighResolutionCapable + NO + +