From d6bc3b59077bf5d9e0cb734d093e0f354cee096c Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 21 Mar 2012 11:39:11 +1000 Subject: [PATCH] Disable module api object support in v4. We cannot create the module object during compilation as compilation may be done in a thread. Disable this optimization until additional type information can be known at compile time. Change-Id: I416ebf7595e2916a28f22fa8ebf512cbf3a8cde3 Reviewed-by: Chris Adams --- src/qml/qml/v4/qv4irbuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/qml/v4/qv4irbuilder.cpp b/src/qml/qml/v4/qv4irbuilder.cpp index 481b23eb4a..ea4d1afbbc 100644 --- a/src/qml/qml/v4/qv4irbuilder.cpp +++ b/src/qml/qml/v4/qv4irbuilder.cpp @@ -428,7 +428,7 @@ bool QV4IRBuilder::visit(AST::IdentifierExpression *ast) if (r.isValid()) { if (r.type) { _expr.code = _block->ATTACH_TYPE(name, r.type, IR::Name::ScopeStorage, line, column); - } else if (r.importNamespace) { + } /*else if (r.importNamespace) { QQmlMetaType::ModuleApiInstance *moduleApi = m_expression->importCache->moduleApi(r.importNamespace); if (moduleApi) { if (moduleApi->qobjectCallback) { @@ -439,7 +439,7 @@ bool QV4IRBuilder::visit(AST::IdentifierExpression *ast) if (moduleApi->qobjectApi) _expr.code = _block->MODULE_OBJECT(name, moduleApi->qobjectApi->metaObject(), IR::Name::MemberStorage, line, column); } - } + }*/ //### we can't create the actual QObject here, as we may be running in a thread (can be reenabled once QTBUG-24894 is handled) // We don't support anything else } else { bool found = false;