aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-12-07 10:44:48 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-09 16:01:51 +0000
commit8885cd8748c5c5be8f745b3fc560881584ead9e5 (patch)
treef6309f47b389df00c1fdbd4bb473a5a8c12e8de5 /src/quickcontrols2
parent710caf8629f1d70bcc68ebb61b27724fdd1f7352 (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 Change-Id: I8e5533f9c6834765610773e46f97fbd56a242039 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 4a718113abdc16b37f57b4f83a9a609ef0281719) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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 ae0bdffc..b78e7424 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)