diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-23 12:47:07 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-23 12:47:07 (GMT) |
commit | 94382009d4cc40641dc06f3e25b3376fede1932b (patch) | |
tree | b57ece1d5b07fc242778003c6342f38591e26b30 /src/declarative/qml | |
parent | b0bc605e2ede4466aabf5b5da040e5801dbf9156 (diff) | |
download | Qt-94382009d4cc40641dc06f3e25b3376fede1932b.zip Qt-94382009d4cc40641dc06f3e25b3376fede1932b.tar.gz Qt-94382009d4cc40641dc06f3e25b3376fede1932b.tar.bz2 |
Only compile time register synthesized objects
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qmlcompiler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index c192c50..02cd813 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -645,12 +645,10 @@ void QmlCompiler::compileTree(Object *tree) output->imports = unit->imports; - if (tree->metatype) { - static_cast<QMetaObject &>(output->root) = *tree->metaObject(); + Q_ASSERT(tree->metatype); + static_cast<QMetaObject &>(output->root) = *tree->metaObject(); + if (!tree->metadata.isEmpty()) QmlEnginePrivate::get(engine)->registerCompositeType(output); - } else { - static_cast<QMetaObject &>(output->root) = *output->types.at(tree->type).metaObject(); - } } bool QmlCompiler::buildObject(Object *obj, const BindingContext &ctxt) |