Fix failing tst_qqmlecmascript::qtbug_22843:"with .pragma library"
authorSimon Hausmann <simon.hausmann@digia.com>
Sun, 23 Jun 2013 13:45:46 +0000 (15:45 +0200)
committerLars Knoll <lars.knoll@digia.com>
Sun, 23 Jun 2013 19:39:46 +0000 (21:39 +0200)
Try to to load a .pragma library type of script only once, even if
it has a syntax error.

Change-Id: I32d7fb71647f413dc75e339e7bff8d74f7754c87
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/qqmlvme.cpp

index 7ca6f4f..3092757 100644 (file)
@@ -1159,8 +1159,11 @@ QV4::PersistentValue QQmlVME::run(QQmlContextData *parentCtxt, QQmlScriptData *s
         }
     }
 
-    if (!script->m_program)
+    if (!script->m_program) {
+        if (shared)
+            script->m_loaded = true;
         return QV4::PersistentValue();
+    }
 
     QV4::Value qmlglobal = QV4::QmlContextWrapper::qmlScope(v8engine, ctxt, 0);
     QV4::QmlContextWrapper::takeContextOwnership(qmlglobal);