aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v4/qv4irbuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/v4/qv4irbuilder.cpp')
-rw-r--r--src/qml/qml/v4/qv4irbuilder.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/qml/v4/qv4irbuilder.cpp b/src/qml/qml/v4/qv4irbuilder.cpp
index 79090b4269..93c552173f 100644
--- a/src/qml/qml/v4/qv4irbuilder.cpp
+++ b/src/qml/qml/v4/qv4irbuilder.cpp
@@ -446,15 +446,15 @@ bool QV4IRBuilder::visit(AST::IdentifierExpression *ast)
if (r.type) {
_expr.code = _block->ATTACH_TYPE(name, r.type, IR::Name::ScopeStorage, line, column);
} else if (r.importNamespace) {
- QQmlMetaType::ModuleApiInstance *moduleApi = m_expression->importCache->moduleApi(r.importNamespace);
- if (moduleApi && moduleApi->instanceMetaObject) {
- // Note: we don't need to check moduleApi->qobjectCallback here, since
- // we did that check in registerModuleApi() in qqmlmetatype.cpp.
- // We cannot create the QObject Module Api Instance here,
+ QQmlMetaType::SingletonInstance *singletonType = m_expression->importCache->singletonType(r.importNamespace);
+ if (singletonType && singletonType->instanceMetaObject) {
+ // Note: we don't need to check singletonType->qobjectCallback here, since
+ // we did that check in registerSingletonType() in qqmlmetatype.cpp.
+ // We cannot create the QObject Singleton Type Instance here,
// as we might be running in a loader thread.
- // Thus, V4 can only handle bindings which use Module APIs which
+ // Thus, V4 can only handle bindings which use Singleton Types which
// were registered with the templated registration function.
- _expr.code = _block->MODULE_OBJECT(name, moduleApi->instanceMetaObject, IR::Name::MemberStorage, line, column);
+ _expr.code = _block->MODULE_OBJECT(name, singletonType->instanceMetaObject, IR::Name::MemberStorage, line, column);
}
}
// We don't support anything else