diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-09-12 14:43:56 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 14:26:01 +0200 |
commit | 6042327dee1f8dd912a86be16f4044d259c9b3e4 (patch) | |
tree | 48091ee06fc657dcbdd090a27b3ed0eec88bc55b /src/qml/compiler/qv4compileddata_p.h | |
parent | bbb78a92a910d32b2886af62c218db87325eb6ce (diff) |
[new compiler] Initial support for group properties
This implements support for "font.pixelSize: 24" for example. The representation
in the compile data structure is so that font.pixelSize is short-hand for
font {
pixelSize: 24
}
which means that inside the braces is a complete object initializer. For that
initializer we create a dedicated CompiledData::Object, which however has its
type name empty. When populating the outer instance then, the "font" property
is read as QQmlValueType (a QObject) and instead of creating a new QObject we
use that value type as instance to run the rest of the QML object initializer
(everything in braces).
Change-Id: Ic0a37ac77ab88f582546b9c09a3d06a07726420b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index c98d53a1fa..9f8bd80f4d 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -315,6 +315,9 @@ struct Property struct Object { + // An empty inherited type name suggests that this object doesn't require to be instantiated + // by itself but is merely used for grouped properties. It can therefore only have bindings, + // so nProperties, nFunctions and nSignals must be zero. quint32 inheritedTypeNameIndex; quint32 idIndex; quint32 indexOfDefaultProperty; |