diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-10 02:29:04 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-10 02:29:04 (GMT) |
commit | af1350249ea9de68e1c4b72ed1179948aa28ca19 (patch) | |
tree | 8aaeff10629ec7490b63998976f2ff0ae993e0f8 /src/declarative/qml/qdeclarativecompiler.cpp | |
parent | e3b5de8651586cf5484fd8ab217cddf17f0fe01e (diff) | |
download | Qt-af1350249ea9de68e1c4b72ed1179948aa28ca19.zip Qt-af1350249ea9de68e1c4b72ed1179948aa28ca19.tar.gz Qt-af1350249ea9de68e1c4b72ed1179948aa28ca19.tar.bz2 |
Create property cache in case of Component{} root
Change-Id: I36f969d09d8ce5e0b68b657b514586990e88ebe4
Task-number: QTBUG-19354
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-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 e642a67..abde4ad 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -622,6 +622,7 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine, out->dumpInstructions(); if (compilerStatDump()) dumpStats(); + Q_ASSERT(out->rootPropertyCache); } else { reset(out); } @@ -1218,6 +1219,11 @@ void QDeclarativeCompiler::genComponent(QDeclarativeParser::Object *obj) id.setId.index = obj->idIndex; output->bytecode << id; } + + if (obj == unitRoot) { + output->rootPropertyCache = output->types[obj->type].createPropertyCache(engine); + output->rootPropertyCache->addref(); + } } bool QDeclarativeCompiler::buildComponent(QDeclarativeParser::Object *obj, |