diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-10 12:29:04 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-10 12:37:52 +1000 |
commit | 281d15b90c95c64dca5ce674b41045efc4419b95 (patch) | |
tree | 91723d9f728b3eba1257182d70f06ffeca4954ac /src | |
parent | 6e69712287fa2d6087e5423cc4b7aace8b790894 (diff) |
Create property cache in case of Component{} root
Change-Id: I36f969d09d8ce5e0b68b657b514586990e88ebe4
Task-number: QTBUG-19354
(cherry picked from commit af1350249ea9de68e1c4b72ed1179948aa28ca19)
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 72010c0ef2..43bb58c88a 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -650,6 +650,7 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine, out->dumpInstructions(); if (compilerStatDump()) dumpStats(); + Q_ASSERT(out->rootPropertyCache); } else { reset(out); } @@ -1230,6 +1231,11 @@ void QDeclarativeCompiler::genComponent(QDeclarativeParser::Object *obj) id.setId.index = obj->idIndex; output->addInstruction(id); } + + if (obj == unitRoot) { + output->rootPropertyCache = output->types[obj->type].createPropertyCache(engine); + output->rootPropertyCache->addref(); + } } bool QDeclarativeCompiler::buildComponent(QDeclarativeParser::Object *obj, |