From b028fb60e30ec7848096276bfeeac13091b888f8 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 8 Sep 2020 11:24:57 +0200 Subject: macos: Rename macos style to macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change shouldn't matter much to widgets, since style names there are case insensitive. But for controls style names are case sensitive, and in that case, "macOS" looks more correct. Change-Id: Ia1d442bce465692ff58fecba1cc68ecbb2e52549 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qcocoatheme.mm | 2 +- src/plugins/styles/mac/macstyle.json | 2 +- src/plugins/styles/mac/qmacstyle_mac.mm | 2 +- src/widgets/doc/src/widgets-and-layouts/gallery.qdoc | 2 +- tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index af4c1550e7..f88569df05 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("macos")); + 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 a3f378799f..5d7a50a339 100644 --- a/src/plugins/styles/mac/macstyle.json +++ b/src/plugins/styles/mac/macstyle.json @@ -1,3 +1,3 @@ { - "Keys": [ "macos" ] + "Keys": [ "macOS" ] } diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 88de97ab10..71f080ab13 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -2567,7 +2567,7 @@ QPalette QMacStyle::standardPalette() const { auto platformTheme = QGuiApplicationPrivate::platformTheme(); auto styleNames = platformTheme->themeHint(QPlatformTheme::StyleNames); - if (styleNames.toStringList().contains("macos")) + 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 8f57b9760a..8e3df06843 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 ("macos") 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/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 0329498a94..db8d6cdd45 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -2892,7 +2892,7 @@ void tst_QGraphicsView::scrollBarRanges() QFETCH(ExpectedValueDescription, vmax); QFETCH(bool, useStyledPanel); - if (useStyledPanel && style == "macos" && platformName == QStringLiteral("cocoa")) + if (useStyledPanel && style == "macOS" && platformName == QStringLiteral("cocoa")) QSKIP("Insignificant on OSX"); QScopedPointer stylePtr; -- cgit v1.2.3