aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-08-31 15:39:19 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-09-07 14:55:28 +0200
commit65c300c74a95a62571bcc60929707dc946be7af7 (patch)
tree2e3a6b24d74bb4fbb77ff36f21fe561957829c1f /src/quickcontrols2
parentf7313c2cec4f9c70dfeade827ba18c40c1b3331e (diff)
Native style: only list available built-in styles
Don't add e.g Windows style to the list of built-in styles when running on other platforms than Windows. The Windows style is only available on Windows. Otherwise e.g the autotests will try to execute all the tests for a style that is not present. Change-Id: Iee8b052fd284840951a77d117071ab1b59ee92bc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quickcontrols2')
-rw-r--r--src/quickcontrols2/qquickstyle.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp
index 3aab8337..10cfb36b 100644
--- a/src/quickcontrols2/qquickstyle.cpp
+++ b/src/quickcontrols2/qquickstyle.cpp
@@ -384,10 +384,14 @@ QStringList QQuickStylePrivate::builtInStyles()
QLatin1String("Default"),
QLatin1String("Fusion"),
QLatin1String("Imagine"),
+#ifdef Q_OS_MACOS
QLatin1String("macOS"),
+#endif
QLatin1String("Material"),
QLatin1String("Universal"),
+#ifdef Q_OS_WINDOWS
QLatin1String("Windows")
+#endif
};
}