aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-12 14:43:56 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 14:26:01 +0200
commit6042327dee1f8dd912a86be16f4044d259c9b3e4 (patch)
tree48091ee06fc657dcbdd090a27b3ed0eec88bc55b /src/qml/qml/qqmlobjectcreator_p.h
parentbbb78a92a910d32b2886af62c218db87325eb6ce (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/qml/qqmlobjectcreator_p.h')
-rw-r--r--src/qml/qml/qqmlobjectcreator_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h
index 673809dd9b..509fda30e7 100644
--- a/src/qml/qml/qqmlobjectcreator_p.h
+++ b/src/qml/qml/qqmlobjectcreator_p.h
@@ -87,6 +87,8 @@ public:
QList<QQmlError> errors;
private:
+ void populateInstance(int index, QObject *instance, QQmlRefPointer<QQmlPropertyCache> cache);
+
QVector<QQmlAbstractBinding *> setupBindings(QV4::Object *qmlGlobal);
void setupFunctions(QV4::Object *qmlGlobal);