Commit 75d1fa5d authored by Marco Bubke's avatar Marco Bubke Committed by Kai Koehne
Browse files

Set the rootObject of a file component as the parent of the context of

the file component

Reviewed-by: kkoehne
parent d65af80c
......@@ -176,7 +176,9 @@ QObject *NodeMetaInfo::createInstance(QDeclarativeContext *context) const
// qml component
// TODO: This is maybe expensive ...
QDeclarativeComponent component(context->engine(), QUrl::fromLocalFile(m_data->qmlFile));
object = component.create(new QDeclarativeContext(context));
QDeclarativeContext *newContext = new QDeclarativeContext(context);
object = component.create(newContext);
} else {
// primitive
object = QDeclarativeMetaType::qmlType(typeName().toAscii(), minorVersion(), majorVersion())->create();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment