aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-01-16 10:22:39 +0100
committerAndy Shaw <andy.shaw@qt.io>2020-01-27 10:37:36 +0100
commit28610e13e453c33d7118834a0effb7ac87427ffe (patch)
treed1a04d3d7122198e83e33d41430d2968e90def70
parenta2443f0a34da85de014b9507926c4ac415543b03 (diff)
Look for the fallback style in all of the style paths
Fixes: QTBUG-81216 Change-Id: I9d3efeec7f9ec2beda24ff74e39d04104f5eb967 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r--src/quickcontrols2/qquickstyle.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp
index 7a3359ef..707e4730 100644
--- a/src/quickcontrols2/qquickstyle.cpp
+++ b/src/quickcontrols2/qquickstyle.cpp
@@ -384,7 +384,13 @@ void QQuickStylePrivate::init(const QUrl &baseUrl)
spec->resolve(baseUrl);
if (!spec->fallbackStyle.isEmpty()) {
- QString fallbackStyle = spec->findStyle(QQmlFile::urlToLocalFileOrQrc(baseUrl), spec->fallbackStyle);
+ QString fallbackStyle;
+ const QStringList stylePaths = QQuickStylePrivate::stylePaths();
+ for (const QString &path : stylePaths) {
+ fallbackStyle = spec->findStyle(path, spec->fallbackStyle);
+ if (!fallbackStyle.isEmpty())
+ break;
+ }
if (fallbackStyle.isEmpty()) {
if (spec->fallbackStyle.compare(QStringLiteral("Default")) != 0) {
qWarning() << "ERROR: unable to locate fallback style" << spec->fallbackStyle;