summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecompiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index b5bf972..d27aced 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -1089,6 +1089,23 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeParser::Object *obj)
fetch.line = prop->location.start.line;
output->bytecode << fetch;
+ if (!prop->value->metadata.isEmpty()) {
+ QDeclarativeInstruction meta;
+ meta.type = QDeclarativeInstruction::StoreMetaObject;
+ meta.line = 0;
+ meta.storeMeta.data = output->indexForByteArray(prop->value->metadata);
+ meta.storeMeta.aliasData = output->indexForByteArray(prop->value->synthdata);
+ meta.storeMeta.propertyCache = output->propertyCaches.count();
+ // ### Surely the creation of this property cache could be more efficient
+ QDeclarativePropertyCache *propertyCache =
+ enginePrivate->cache(prop->value->metaObject()->superClass())->copy();
+ propertyCache->append(engine, prop->value->metaObject(), QDeclarativePropertyCache::Data::NoFlags,
+ QDeclarativePropertyCache::Data::IsVMEFunction);
+
+ output->propertyCaches << propertyCache;
+ output->bytecode << meta;
+ }
+
genObjectBody(prop->value);
QDeclarativeInstruction pop;