aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmetatype.cpp
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-06-29 12:25:20 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-16 04:46:50 +0200
commit432a48b8f2d9ebaef1bd7be4a168a45524faaf68 (patch)
treede7ff211c9e1b3b2bd0156b464bacbfbea475a1d /src/qml/qml/qqmlmetatype.cpp
parent9bc216f6fa34484bf582cbc3ccd2bb7b45826bc7 (diff)
Support remote import paths
Probe for installed modules in import path elements which are not local to the machine. Note that all local paths in the import path list will be tried before any remote locations are probed. Task-number: QTBUG-21386 Change-Id: I4f7b9e54e54c1d62a5e7cb7f059ee1e9319ef054 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlmetatype.cpp')
-rw-r--r--src/qml/qml/qqmlmetatype.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 34c9cceb9a..c1147b025b 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -993,12 +993,18 @@ bool QQmlMetaType::isAnyModule(const QString &uri)
QReadLocker lock(metaTypeDataLock());
QQmlMetaTypeData *data = metaTypeData();
+ // first, check Types
for (QQmlMetaTypeData::TypeModules::ConstIterator iter = data->uriToModule.begin();
iter != data->uriToModule.end(); ++iter) {
if ((*iter)->module() == uri)
return true;
}
+ // then, check ModuleApis
+ QQmlMetaTypeData::ModuleApiList *apiList = data->moduleApis.value(uri);
+ if (apiList)
+ return true;
+
return false;
}