From 186cdd1c29f1c708455ec2f0771a6eb600d4a075 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 4 Jan 2010 10:25:12 +0100 Subject: Revert "Maybe fix QTBUG-5690" This reverts commit 40477f47685a2745cb591bde5669338a4a0a70eb. Need to clarify the issue a bit further first. --- src/declarative/qml/qmlcomponent.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 8c32fa4..2d53b0b 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -528,8 +528,7 @@ QmlComponent::QmlComponent(QmlComponentPrivate &dd, QObject *parent) QScriptValue QmlComponent::createObject() { Q_D(QmlComponent); - //QmlContext* ctxt = creationContext(); - QmlContext* ctxt = d->engine->rootContext();//Fixes QTBUG-5690, but is it the right fix? + QmlContext* ctxt = creationContext(); if(!ctxt){ qWarning() << QLatin1String("createObject can only be used in QML"); return QScriptValue(); -- cgit v0.12