From 65c300c74a95a62571bcc60929707dc946be7af7 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 31 Aug 2020 15:39:19 +0200 Subject: 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 --- src/quickcontrols2/qquickstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/quickcontrols2') 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 }; } -- cgit v1.2.3