diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-05-24 06:54:25 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-05-24 06:54:25 (GMT) |
commit | b82f89bf650ea8a7685737f737d410a089325152 (patch) | |
tree | 9a37ae603591afbc1cd68f449b22f876682bcb42 /src/declarative/qml | |
parent | 82e5ad18fdde7fba4146f28dec897328ec331dff (diff) | |
parent | 56f0ab34eff5282fc0444b95fa359535a96e5c1e (diff) | |
download | Qt-b82f89bf650ea8a7685737f737d410a089325152.zip Qt-b82f89bf650ea8a7685737f737d410a089325152.tar.gz Qt-b82f89bf650ea8a7685737f737d410a089325152.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 17 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativevmemetaobject.cpp | 2 |
2 files changed, 18 insertions, 1 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; diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp index 13e9c26..7aea7cb 100644 --- a/src/declarative/qml/qdeclarativevmemetaobject.cpp +++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp @@ -381,7 +381,7 @@ QDeclarativeVMEMetaObject::QDeclarativeVMEMetaObject(QObject *obj, const QMetaObject *other, const QDeclarativeVMEMetaData *meta, QDeclarativeCompiledData *cdata) -: object(obj), compiledData(cdata), ctxt(QDeclarativeData::get(obj)->outerContext), +: object(obj), compiledData(cdata), ctxt(QDeclarativeData::get(obj, true)->outerContext), metaData(meta), data(0), methods(0), parent(0) { compiledData->addref(); |