summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-01 05:59:59 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-01 05:59:59 (GMT)
commitb8b4613800abfe1bc8861011c7152d6d242414e1 (patch)
tree9044d09fd1a48133f00b36f03d8647d76f90b173 /src
parent8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6 (diff)
downloadQt-b8b4613800abfe1bc8861011c7152d6d242414e1.zip
Qt-b8b4613800abfe1bc8861011c7152d6d242414e1.tar.gz
Qt-b8b4613800abfe1bc8861011c7152d6d242414e1.tar.bz2
Optimization: Minor object allocation speedup
Diffstat (limited to 'src')
-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);