aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-12-07 10:44:48 +0100
committerMitch Curtis <mitch.curtis@qt.io>2020-12-09 15:54:01 +0100
commit4a718113abdc16b37f57b4f83a9a609ef0281719 (patch)
tree2e2b25e18466e778d2256083da110786356a1845 /src/quickcontrols2
parent0f7e6d8ddd5d59ead283ec7e7453f563b9465439 (diff)
Allow style to be set to "Default" for compatibility
This unbreaks Qt 5 applications that weren't specifying a style or were specifying Default. [ChangeLog][Important Behavior Changes] Setting the style to "Default" now behaves the same way as not specifying a style; a relevant style will be chosen based on the platform. To use the style previously known as "Default", use "Basic". Task-number: QTBUG-85984 Pick-to: 6.0 Change-Id: I8e5533f9c6834765610773e46f97fbd56a242039 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quickcontrols2')
-rw-r--r--src/quickcontrols2/qquickstyle.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp
index bbbd7fb1..f4e1da00 100644
--- a/src/quickcontrols2/qquickstyle.cpp
+++ b/src/quickcontrols2/qquickstyle.cpp
@@ -184,8 +184,11 @@ struct QQuickStyleSpec
// Find the config file.
resolveConfigFilePath();
- if (style.isEmpty()) {
- qCDebug(lcQtQuickControlsStyle) << "no style was specified; checking if we have an appropriate style for this platform";
+ if (style.isEmpty() || style.toLower() == QStringLiteral("default")) {
+ style.clear();
+
+ qCDebug(lcQtQuickControlsStyle) << "no style (or Default) was specified;"
+ << "checking if we have an appropriate style for this platform";
#if defined(Q_OS_MACOS)
style = QLatin1String("macOS");
#elif defined(Q_OS_WINDOWS)