summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiler.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-09-30 01:07:07 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-05 02:39:02 (GMT)
commit49527e854a9edb0a92e64264d6efac6be46cf0ed (patch)
tree2bcc8dad3c1e6c0a239eac5e3188c2ec8eada602 /src/declarative/qml/qmlcompiler.cpp
parentc4190288ca68eca9b84ccab67d860517a6a8e7c5 (diff)
downloadQt-49527e854a9edb0a92e64264d6efac6be46cf0ed.zip
Qt-49527e854a9edb0a92e64264d6efac6be46cf0ed.tar.gz
Qt-49527e854a9edb0a92e64264d6efac6be46cf0ed.tar.bz2
Create a property cache for synthesized metaobjects
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index e67f79a..0b4ac20 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -647,7 +647,7 @@ void QmlCompiler::compileTree(Object *tree)
Q_ASSERT(tree->metatype);
static_cast<QMetaObject &>(output->root) = *tree->metaObject();
- if (!tree->metadata.isEmpty())
+ if (!tree->metadata.isEmpty())
QmlEnginePrivate::get(engine)->registerCompositeType(output);
}
@@ -807,7 +807,9 @@ void QmlCompiler::genObject(QmlParser::Object *obj)
meta.line = -1;
meta.storeMeta.data = output->indexForByteArray(obj->metadata);
meta.storeMeta.aliasData = output->indexForByteArray(obj->synthdata);
- meta.storeMeta.slotData = -1;
+ meta.storeMeta.propertyCache = output->propertyCaches.count();
+ // ### Surely the creation of this property cache could be more efficient
+ output->propertyCaches << QmlPropertyCache::create(engine, obj->metaObject());
output->bytecode << meta;
}