Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Chris Adams
authored and
Qt by Nokia
committed
Sep 19, 2011
1 parent
1aa075b
commit 85554f7
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/auto/declarative/qdeclarativeecmascript/data/listAssignment.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters