aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-08 11:05:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-12 23:00:19 +0200
commit346662cb011b7962a8cabf6d55742cd050a6ba6c (patch)
treeef71f9e15cfb6816c793eff5c9c097cf2d121ff9 /src/qml/qml/qqmlcomponent.cpp
parent845b07dad47e63bf285461433f4321d71c6c343d (diff)
Fix error reporting timing
Errors for example in signal declarations are usually reported in the loader thread, during property cache construction. This patch separates out the property cache population into QQmlPropertyCacheCreator, runs it from the loader thread and reduces the QQmlObjectCreator to merely set the properties/bindings/ functions on the object. This also enables location tracking for signal declarations and their error reporting. Change-Id: Ief1ffbb3113f8279a50d1a12dab8dbe096702a60 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 475e69cd77..dfa8fc701d 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -896,7 +896,12 @@ QQmlComponentPrivate::beginCreate(QQmlContextData *context)
enginePriv->referenceScarceResources();
QObject *rv = 0;
if (enginePriv->useNewCompiler) {
- state.creator = new QtQml::QmlObjectCreator(engine, url, context, cc);
+ QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine);
+ if (cc->compilationUnit && !cc->compilationUnit->engine)
+ cc->compilationUnit->linkToEngine(v4);
+
+ state.creator = new QmlObjectCreator(context, cc->qmlUnit, cc->compilationUnit, cc->importCache,
+ cc->propertyCaches, cc->datas);
rv = state.creator->create();
if (!rv)
state.errors = state.creator->errors;