diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-01 05:59:59 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-01 05:59:59 (GMT) |
commit | b8b4613800abfe1bc8861011c7152d6d242414e1 (patch) | |
tree | 9044d09fd1a48133f00b36f03d8647d76f90b173 /src/declarative/qml | |
parent | 8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6 (diff) | |
download | Qt-b8b4613800abfe1bc8861011c7152d6d242414e1.zip Qt-b8b4613800abfe1bc8861011c7152d6d242414e1.tar.gz Qt-b8b4613800abfe1bc8861011c7152d6d242414e1.tar.bz2 |
Optimization: Minor object allocation speedup
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativevme.cpp | 8 |
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); |