diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-09-16 17:25:53 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 14:26:43 +0200 |
commit | f7cd6238ada2745eea13ceff168e7d65b7263866 (patch) | |
tree | 5c91c251eb3c2ddf1d56dae4ede28af3539b2345 /src/qml/qml/qqmlobjectcreator_p.h | |
parent | 2b832d20185aff91dfa0515cc3f9268240c917a7 (diff) |
[new compiler] Finish support for initializing list properties
Setting a value on a list property is always just appending to the list instead
of replacing it. Based on that, initializing list properties with multiple
items is done with one binding per item to the same list property. So
myList: [ Item{}, Item{} ]
is mapped to
myList: Item {}
myList: Item {}
Change-Id: Iadc048ab3a8d73ac824aa6b2ae5dec33731fa362
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index f3ff6f6e08..62c344194e 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -97,6 +97,7 @@ private: bool populateInstance(int index, QObject *instance, QQmlRefPointer<QQmlPropertyCache> cache); void setupBindings(QV4::ExecutionContext *qmlContext); + bool setPropertyValue(QV4::ExecutionContext *qmlContext, QQmlPropertyData *property, int index, const QV4::CompiledData::Binding *binding); void setPropertyValue(QQmlPropertyData *property, const QV4::CompiledData::Binding *binding); void setupFunctions(QV4::ExecutionContext *qmlContext); @@ -120,6 +121,7 @@ private: QQmlRefPointer<QQmlPropertyCache> _propertyCache; QQmlVMEMetaObject *_vmeMetaObject; QVector<QQmlAbstractBinding*> _createdBindings; + QQmlListProperty<void> _currentList; }; QT_END_NAMESPACE |