diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-01-23 11:26:29 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2015-01-23 13:15:42 +0100 |
commit | bca7c4195a9898f1aaee0c91776f4302010fe2f0 (patch) | |
tree | 1732d4f1c23ca588266fdc386aceff4e9ccc1391 /src/qml/qml/qqmlimport.cpp | |
parent | 203e85619612c73a01b68d8538819cf0ea685dab (diff) |
Typeloader cleanup
The QQmlDataBlob base class had a typeloader member that was provided with
startLoading() later, just to allow calling the url interceptor. The one
sub-class of QQmlDataBlob - QQmlTypeLoader::Blob - also had a typeloader
pointer, provided at constructor time.
This patch cleans this up by removing the duplicated typeloader pointer in the
sub-class and passing it straight through to the base-class at construction
type. This also allows moving the url interception to the constructor.
Also fixed the findCachedCompilationUnit calls to use the url after applying
the intercept and removed one unnecessary findCachedCompilationUnit call - the
QFile::exists call is sufficient.
Change-Id: If5c49d38a6ec66fea6cd7c21013c046cf75acafd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 20bc28d886..86b60cb73a 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -667,11 +667,7 @@ bool QQmlImportNamespace::Import::resolveType(QQmlTypeLoader *typeLoader, }; for (uint i = 0; i < sizeof(urlsToTry) / sizeof(urlsToTry[0]); ++i) { const QString url = urlsToTry[i]; - exists = !typeLoader->absoluteFilePath(QQmlFile::urlToLocalFileOrQrc(url)).isEmpty(); - if (!exists) - exists = QQmlMetaType::findCachedCompilationUnit(QUrl(url)); - if (exists) { qmlUrl = url; break; |