diff options
-rw-r--r-- | share/qbs/modules/cpp/DarwinGCC.qbs | 3 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackboxapple.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index 81d8bded2..c42d25362 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -110,6 +110,9 @@ UnixGCC { if (qbs.targetOS.contains("macos")) { dict["NSPrincipalClass"] = "NSApplication"; // needed for Retina display support + // QBS-1670: set this flag by default to avoid extensive GPU usage + dict["NSSupportsAutomaticGraphicsSwitching"] = true; + if (minimumMacosVersion) dict["LSMinimumSystemVersion"] = minimumMacosVersion; } diff --git a/tests/auto/blackbox/tst_blackboxapple.cpp b/tests/auto/blackbox/tst_blackboxapple.cpp index 2744f907e..0a6a763ee 100644 --- a/tests/auto/blackbox/tst_blackboxapple.cpp +++ b/tests/auto/blackbox/tst_blackboxapple.cpp @@ -1023,6 +1023,7 @@ void TestBlackboxApple::infoPlist() if (!content.contains(QStringLiteral("SDKROOT"))) { // macOS-specific values QCOMPARE(content.value("LSMinimumSystemVersion"), QStringLiteral("10.7")); QCOMPARE(content.value("NSPrincipalClass"), QStringLiteral("NSApplication")); + QCOMPARE(content.value(QStringLiteral("NSSupportsAutomaticGraphicsSwitching")), true); } else { // QBS-1447: UIDeviceFamily was set to a string instead of an array const auto family = content.value(QStringLiteral("UIDeviceFamily")); |