diff options
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 3 |
1 files changed, 1 insertions, 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(); |