Disable module api object support in v4.
authorMichael Brasser <michael.brasser@nokia.com>
Wed, 21 Mar 2012 01:39:11 +0000 (11:39 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 21 Mar 2012 01:48:32 +0000 (02:48 +0100)
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 <christopher.adams@nokia.com>
src/qml/qml/v4/qv4irbuilder.cpp

index 481b23e..ea4d1af 100644 (file)
@@ -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;