diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/platforms/cocoa/qcocoatheme.mm | 2 | ||||
| -rw-r--r-- | src/plugins/styles/mac/macstyle.json | 2 | ||||
| -rw-r--r-- | src/plugins/styles/mac/main.mm | 2 | ||||
| -rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 2 | ||||
| -rw-r--r-- | src/widgets/doc/src/widgets-and-layouts/gallery.qdoc | 2 | ||||
| -rw-r--r-- | src/widgets/kernel/qapplication.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/styles/qstylefactory.cpp | 8 |
7 files changed, 13 insertions, 7 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index 674a8da60a5..ba6e3bdc439 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -501,7 +501,7 @@ QVariant QCocoaTheme::themeHint(ThemeHint hint) const { switch (hint) { case QPlatformTheme::StyleNames: - return QStringList(QStringLiteral("macintosh")); + return QStringList(QStringLiteral("macos")); case QPlatformTheme::DialogButtonBoxLayout: return QVariant(QPlatformDialogHelper::MacLayout); case KeyboardScheme: diff --git a/src/plugins/styles/mac/macstyle.json b/src/plugins/styles/mac/macstyle.json index 5897815eec6..a3f378799fd 100644 --- a/src/plugins/styles/mac/macstyle.json +++ b/src/plugins/styles/mac/macstyle.json @@ -1,3 +1,3 @@ { - "Keys": [ "macintosh" ] + "Keys": [ "macos" ] } diff --git a/src/plugins/styles/mac/main.mm b/src/plugins/styles/mac/main.mm index ae31bb95fbf..2f11b5cd437 100644 --- a/src/plugins/styles/mac/main.mm +++ b/src/plugins/styles/mac/main.mm @@ -53,7 +53,7 @@ public: QStyle *QMacStylePlugin::create(const QString &key) { QMacAutoReleasePool pool; - if (key.compare(QLatin1String("macintosh"), Qt::CaseInsensitive) == 0) + if (key.compare(QLatin1String("macos"), Qt::CaseInsensitive) == 0) return new QMacStyle(); return 0; diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index a7756919f9a..708f298af5a 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -2572,7 +2572,7 @@ QPalette QMacStyle::standardPalette() const { auto platformTheme = QGuiApplicationPrivate::platformTheme(); auto styleNames = platformTheme->themeHint(QPlatformTheme::StyleNames); - if (styleNames.toStringList().contains("macintosh")) + if (styleNames.toStringList().contains("macos")) return QPalette(); // Inherit everything from theme else return QStyle::standardPalette(); diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc index a82462a432c..8f57b9760a8 100644 --- a/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc @@ -48,7 +48,7 @@ \li The Windows Vista style ("windowsvista") is provided by QWindowsVistaStyle. \row - \li The \macos style ("macintosh") is provided by QMacStyle. + \li The \macos style ("macos") is provided by QMacStyle. \li \image macos-style.png \macos Style \row \li \image fusion-style.png Fusion Style diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 71e18b5af55..7b467d0a3be 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1066,7 +1066,7 @@ void QApplication::setStyle(QStyle *style) Requests a QStyle object for \a style from the QStyleFactory. The string must be one of the QStyleFactory::keys(), typically one of - "windows", "windowsvista", "fusion", or "macintosh". Style + "windows", "windowsvista", "fusion", or "macos". Style names are case insensitive. Returns \nullptr if an unknown \a style is passed, otherwise the QStyle object diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp index 2c4f6f83a15..54a399ed39f 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); |
