aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2021-02-25 11:30:06 +0100
committerMitch Curtis <mitch.curtis@qt.io>2021-02-25 13:08:56 +0100
commita0d73125882a7a937d0d13348c8657ba81d50080 (patch)
tree1e8e76867fa99699d54e6c00367b2751df9fe34d /tests
parent31f73a9c6bd11f43d2155f367cc8cb9c2511515b (diff)
testbench: don't override style stored in settings with default style
Now that we choose e.g. Fusion by default on Linux, QQuickStyle::name() will return that. If the user had a style previously selected and that was stored in settings, we should respect that. So, only prefer QQuickStyle::name() if we're not using the default style. Pick-to: 6.1 6.0 Change-Id: I986f4b169bb99836714f2f2ed99f17746686f946 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/testbench/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/manual/testbench/main.cpp b/tests/manual/testbench/main.cpp
index 206d3965..ddad828f 100644
--- a/tests/manual/testbench/main.cpp
+++ b/tests/manual/testbench/main.cpp
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
QSettings settings;
QString style = QQuickStyle::name();
- if (!style.isEmpty())
+ if (!style.isEmpty() && !QQuickStylePrivate::isUsingDefaultStyle())
settings.setValue("style", style);
else
QQuickStyle::setStyle(settings.value("style").isValid() ? settings.value("style").toString() : "Imagine");