diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-05-19 12:22:55 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-26 21:28:24 +0200 |
commit | 209e55cb1075a6d1698640cd96562856b97fa9be (patch) | |
tree | 96822bc49ec25d31bbb6be13240204fcdc65988a /src/qml/qml/qqmlimport.cpp | |
parent | 578f775db4888184f029987c4953c9e3123a76e6 (diff) |
Fix cached compilation units for file imports
If the file doesn't exist in the file system anymore, check if it's at
least in the unit cache, as we can still load it from there. This is
used for file imports where 'import "someDirectory"' results us in trying
to locate someDirectory/<Type>.qml for any instantiation of <Type>.
Change-Id: I590161f1d2d133a49ca1b611d9a7e96d52d0bf13
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index c0b21a943f..5799886faa 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -672,6 +672,8 @@ bool QQmlImportNamespace::Import::resolveType(QQmlTypeLoader *typeLoader, exists = QQmlFile::bundleFileExists(qmlUrl, typeLoader->engine()); } else { exists = !typeLoader->absoluteFilePath(QQmlFile::urlToLocalFileOrQrc(qmlUrl)).isEmpty(); + if (!exists) + exists = QQmlMetaType::findCachedCompilationUnit(QUrl(qmlUrl)); } if (exists) { |