diff options
author | Liang Qi <liang.qi@qt.io> | 2020-02-15 10:19:38 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-02-15 10:19:38 +0100 |
commit | c9260cd940fe9ca0e440b715cbfc13dd046e07b0 (patch) | |
tree | 9e4a97453f79dc7cf25434785e72920172535afd /src/quickcontrols2/qquickstyle.cpp | |
parent | 8f9f0508e4f3469ae56874fcecc89023b51c2a75 (diff) | |
parent | 025f938c1b4676782674d54375e1e4e560e4b6cd (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
.qmake.conf
tests/auto/qquickpopup/tst_qquickpopup.cpp
Change-Id: Id3bca2da290234f3c69845ffe18c6d9193a1bd28
Diffstat (limited to 'src/quickcontrols2/qquickstyle.cpp')
-rw-r--r-- | src/quickcontrols2/qquickstyle.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp index 7a3359ef..61632b11 100644 --- a/src/quickcontrols2/qquickstyle.cpp +++ b/src/quickcontrols2/qquickstyle.cpp @@ -128,6 +128,7 @@ static QStringList defaultImportPathList() importPaths += QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); # endif #endif + importPaths += envPathList("QML2_IMPORT_PATH"); importPaths += QStringLiteral(":/qt-project.org/imports"); importPaths += QCoreApplication::applicationDirPath(); return importPaths; @@ -384,7 +385,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; |