aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2011-09-08 15:13:42 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-19 07:31:00 +0200
commit85554f7f262ff5aae15562b11c6d08bcc03c961f (patch)
tree42208f1b3ea9ea02ec482314d9a99fa1b701793c /tests/auto/declarative/qdeclarativeecmascript/data
parent1aa075b6319ded90d79dfe28605294283502bead (diff)
Fix QDeclarativeListProperty assignment
This commit ensures that a QDeclarativeListReference can be assigned to another QDeclarativeListProperty, by retrieving each element in the list reference and converting to the appropriate type before appending to the target list property. Task-number: QTBUG-16316 Change-Id: Id8858058f052a53bf43eadc085fd278654478d77 Reviewed-on: http://codereview.qt-project.org/4388 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/listAssignment.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listAssignment.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listAssignment.qml
new file mode 100644
index 0000000000..6e6039715b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/listAssignment.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.0
+import Qt.test 1.0
+
+Item {
+ id: root
+ width: 640
+ height: 480
+
+ property int list1length: list1.length
+
+ property list<MyQmlObject> list1
+ property list<MyQmlObject> list2: [
+ MyQmlObject { id: one; value: 100 },
+ MyQmlObject { id: two; value: 300 }
+ ]
+
+ Component.onCompleted: {
+ root.list1 = root.list2;
+ }
+}