aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlcodegenerator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-16 17:25:53 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 14:26:43 +0200
commitf7cd6238ada2745eea13ceff168e7d65b7263866 (patch)
tree5c91c251eb3c2ddf1d56dae4ede28af3539b2345 /src/qml/compiler/qqmlcodegenerator_p.h
parent2b832d20185aff91dfa0515cc3f9268240c917a7 (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/compiler/qqmlcodegenerator_p.h')
-rw-r--r--src/qml/compiler/qqmlcodegenerator_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator_p.h b/src/qml/compiler/qqmlcodegenerator_p.h
index 7569b9cc7d..4562e88d34 100644
--- a/src/qml/compiler/qqmlcodegenerator_p.h
+++ b/src/qml/compiler/qqmlcodegenerator_p.h
@@ -224,7 +224,7 @@ public:
void appendBinding(AST::UiQualifiedId *name, AST::Statement *value);
void appendBinding(AST::UiQualifiedId *name, int objectIndex);
void appendBinding(const AST::SourceLocation &nameLocation, int propertyNameIndex, AST::Statement *value);
- void appendBinding(const AST::SourceLocation &nameLocation, int propertyNameIndex, int objectIndex);
+ void appendBinding(const AST::SourceLocation &nameLocation, int propertyNameIndex, int objectIndex, bool isListItem = false);
bool setId(AST::Statement *value);
@@ -232,7 +232,7 @@ public:
// with the object any right-hand-side of a binding should apply to.
AST::UiQualifiedId *resolveQualifiedId(AST::UiQualifiedId *name, QmlObject **object);
- bool sanityCheckPropertyName(const AST::SourceLocation &nameLocation, int nameIndex);
+ bool sanityCheckPropertyName(const AST::SourceLocation &nameLocation, int nameIndex, bool isListItem = false);
void recordError(const AST::SourceLocation &location, const QString &description);