diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-09-30 05:52:31 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-30 18:21:39 +0200 |
commit | 2ec852ada2a51e1da47a2ccbb93104fc7938bfc4 (patch) | |
tree | e056c3f931d00fd007f3b4bd1b5b4b907a953151 /src/qml/qml/qqmlcompiler_p.h | |
parent | 172111ae0703d223575862f60e0ceba1973fe681 (diff) |
Fix composite type registration in the new compiler
When setting a property of a composite type like this
property MyType foo: MyType {}
and MyType.qml defines the new type, we test for assignability of MyType to the
property foo. This test happens before MyType is instantiated and it relies on
the meta-type in the CompiledData being set. Therefore this patch makes sure
that the meta-type and the list meta-type are set accordingly at type
compilation time, not instantiation time, similar to how it's done in the VME.
Change-Id: Id7231e0a0113fa63ba6508bfbb1565dd554c5e56
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcompiler_p.h')
-rw-r--r-- | src/qml/qml/qqmlcompiler_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h index 9e63ecb22c..475e43823a 100644 --- a/src/qml/qml/qqmlcompiler_p.h +++ b/src/qml/qml/qqmlcompiler_p.h @@ -145,6 +145,7 @@ public: QHash<int, int> objectIndexToIdForRoot; bool isComponent(int objectIndex) const { return objectIndexToIdPerComponent.contains(objectIndex); } + bool isCompositeType() const { return !datas.at(qmlUnit->indexOfRootObject).isEmpty(); } // --- struct Instruction { |