aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypeloader.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-05-04 15:17:29 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-05-08 14:04:41 +0000
commitbdbf6a53c0ab8a7f6ea5586767a6ed818e3d555e (patch)
treeca40f396b7c4eb5e3b28b4f5bd28c806c8fdef95 /src/qml/qml/qqmltypeloader.cpp
parent4115adb95f2670b96b036215abe98e0f40c58b95 (diff)
Fix loading of composite singletons from resources
Commit f6bbeeb417102c61e8bf23f41e412ed9753a348d began normalizing the resource urls in the type loader, which broke loading of qml singletons from resources, as the normalized url is also used for the "pragma singleton" verification to check that the singleton is in the meta-type registry. If the registration was done with a non-normalized url, the check would fail with a misleading error message. Task-number: QTBUG-68025 Change-Id: I1093ee0cbee884b4a51195c302c8908f748e747e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r--src/qml/qml/qqmltypeloader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index a0f7ec967c..9856a0be80 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -1667,7 +1667,7 @@ QQmlTypeData *QQmlTypeLoader::getType(const QUrl &unNormalizedUrl, Mode mode)
(QQmlFile::urlToLocalFileOrQrc(unNormalizedUrl).isEmpty() ||
!QDir::isRelativePath(QQmlFile::urlToLocalFileOrQrc(unNormalizedUrl))));
- QUrl url = normalize(unNormalizedUrl);
+ const QUrl url = normalize(unNormalizedUrl);
LockHolder<QQmlTypeLoader> holder(this);
@@ -1732,7 +1732,7 @@ QQmlScriptBlob *QQmlTypeLoader::getScript(const QUrl &unNormalizedUrl)
(QQmlFile::urlToLocalFileOrQrc(unNormalizedUrl).isEmpty() ||
!QDir::isRelativePath(QQmlFile::urlToLocalFileOrQrc(unNormalizedUrl))));
- QUrl url = normalize(unNormalizedUrl);
+ const QUrl url = normalize(unNormalizedUrl);
LockHolder<QQmlTypeLoader> holder(this);