From 37019a96db01b99a76b67b9e655bc457e8edb5a1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 4 Feb 2014 15:46:48 +0100 Subject: [new compiler] Fix propagation of imported scripts for anonymous components We must take the imported scripts from the creation context. Fixes various errors in Qt Quick Controls. Change-Id: I336d8ffa0537cefd4eeac15f98bbf1b0a5c784af Reviewed-by: Lars Knoll --- src/qml/qml/qqmlcomponent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/qml/qqmlcomponent.cpp') diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 898a00a9bb..bf87a9dd2d 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -862,7 +862,7 @@ QQmlComponentPrivate::beginCreate(QQmlContextData *context) enginePriv->referenceScarceResources(); QObject *rv = 0; if (enginePriv->useNewCompiler) { - state.creator = new QmlObjectCreator(context, cc); + state.creator = new QmlObjectCreator(context, cc, creationContext); rv = state.creator->create(start); if (!rv) state.errors = state.creator->errors; @@ -1057,7 +1057,7 @@ void QQmlComponent::create(QQmlIncubator &incubator, QQmlContext *context, p->compiledData = d->cc; p->compiledData->addref(); if (enginePriv->useNewCompiler) { - p->creator.reset(new QmlObjectCreator(contextData, d->cc)); + p->creator.reset(new QmlObjectCreator(contextData, d->cc, d->creationContext)); p->subComponentToCreate = d->start; } else p->vme.init(contextData, d->cc, d->start, d->creationContext); -- cgit v1.2.3