diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-02-22 18:13:34 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-03-20 06:11:44 +0000 |
commit | 0b7e479235aec74f051af4d5ef95e74753b59c6d (patch) | |
tree | e6d23fc3dc6991f495246b2b54416517e9407261 /src/qml/qml | |
parent | db292d1fe70a0cfaf315a72d099441cf3969e284 (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |