Skip to content

Commit

Permalink
macOS: Allow tests to mark themselves as not supporting high-DPI
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
torarnv committed Mar 14, 2018
1 parent 3b42e09 commit 9e26ca8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mkspecs/features/testcase.prf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions mkspecs/macx-clang/Info.plist.disable_highdpi
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 9e26ca8

Please sign in to comment.