summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlvme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlvme.cpp')
-rw-r--r--src/declarative/qml/qmlvme.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index a49cbd3..4d133e3 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -222,6 +222,14 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledData
case QmlInstruction::CreateComponent:
{
QObject *qcomp = new QmlComponent(ctxt->engine(), comp, ii + 1, instr.createComponent.count, stack.isEmpty() ? 0 : stack.top());
+
+ QmlEngine::setContextForObject(qcomp, ctxt);
+ QmlDeclarativeData *ddata = QmlDeclarativeData::get(qcomp);
+ Q_ASSERT(ddata);
+ ddata->outerContext = ctxt;
+ ddata->lineNumber = instr.line;
+ ddata->columnNumber = instr.create.column;
+
stack.push(qcomp);
ii += instr.createComponent.count;
}