summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/features/testcase.prf12
-rw-r--r--mkspecs/macx-clang/Info.plist.disable_highdpi8
2 files changed, 20 insertions, 0 deletions
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index 8d51c9d028..3bbaf4575a 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 0000000000..a9b89888ad
--- /dev/null
+++ b/mkspecs/macx-clang/Info.plist.disable_highdpi
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>NSHighResolutionCapable</key>
+ <string>NO</string>
+</dict>
+</plist>