summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativevme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativevme.cpp')
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 6498e6c..0bdc4d5 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -255,7 +255,13 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
ddata->columnNumber = instr.createSimple.column;
QObjectPrivate::get(o)->declarativeData = ddata;
- ctxt->addObject(o);
+
+ ddata->nextContextObject = ctxt->contextObjects;
+ if (ddata->nextContextObject)
+ ddata->nextContextObject->prevContextObject = &ddata->nextContextObject;
+ ddata->prevContextObject = &ctxt->contextObjects;
+ ctxt->contextObjects = ddata;
+
QObject *parent = stack.top();
QDeclarative_setParent_noEvent(o, parent);