From 0b7e479235aec74f051af4d5ef95e74753b59c6d Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 22 Feb 2019 18:13:34 +0100 Subject: Create import directory from intercepted URL, not orignial one If the qmldir URL got intercepted, we should use the intercepted URL to get to the contents to be loaded. Fixes: QTBUG-73843 Change-Id: I51715575e767ed429a8237517f47196677409fe0 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlimport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/qml') diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index e379d416fd..a31dbd1e08 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1546,7 +1546,7 @@ bool QQmlImportsPrivate::addFileImport(const QString& uri, const QString &prefix QString localFileOrQrc = QQmlFile::urlToLocalFileOrQrc(qmldirUrl); Q_ASSERT(!localFileOrQrc.isEmpty()); - QString dir = QQmlFile::urlToLocalFileOrQrc(resolveLocalUrl(base, importUri)); + const QString dir = localFileOrQrc.left(localFileOrQrc.lastIndexOf(Slash) + 1); if (!typeLoader->directoryExists(dir)) { if (!isImplicitImport) { QQmlError error; -- cgit v1.2.3