diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2020-08-19 14:44:17 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2020-08-26 16:37:43 +0200 |
commit | ed813c19fa422cd0858dda25a3c401e428fd6e0b (patch) | |
tree | 7296f82cede7315b8112c7fb6ded7ddfb7abce59 /src/widgets/styles | |
parent | 9efe2a8603cd9023bfebb96a3a7ca4a65002669d (diff) |
macOS: rename 'macintosh' style to 'macos'
Change the name/key of the style to 'macos'. Besides the
name 'macintosh' being archaic, we also need this
change to avoid creating 'macintosh' style folders
in QtQuickControls, now that we plan to use QPlatformTheme
also there to resolve the style.
[ChangeLog][Widgets][QStyle] The 'macintosh' style
has been renamed to 'macos'.
Change-Id: I14b8a8b4dbd369e7a7d16b94e4ad27e501e7e8d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qstylefactory.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp index 2c4f6f83a1..54a399ed39 100644 --- a/src/widgets/styles/qstylefactory.cpp +++ b/src/widgets/styles/qstylefactory.cpp @@ -69,7 +69,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, The valid keys can be retrieved using the keys() function. Typically they include "windows" and "fusion". Depending on the platform, "windowsvista" - and "macintosh" may be available. + and "macos" may be available. Note that keys are case insensitive. \sa QStyle @@ -100,6 +100,12 @@ QStyle *QStyleFactory::create(const QString& key) ret = new QFusionStyle; else #endif +#if defined(Q_OS_MACOS) && QT_DEPRECATED_SINCE(6, 0) + if (style == QLatin1String("macintosh")) { + qWarning() << "The style key 'macintosh' is deprecated. Please use 'macos' instead."; + style = QStringLiteral("macos"); + } else +#endif { } // Keep these here - they make the #ifdefery above work if (!ret) ret = qLoadPlugin<QStyle, QStylePlugin>(loader(), style); |