diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-10-25 08:52:01 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-26 02:11:24 +0200 |
commit | 4e931c4a436ea3dcf6e1921488771aa1e79eda13 (patch) | |
tree | 42ca55bb58cfc827a291e1bca122a901670d8ad0 /tests/auto/declarative/qdeclarativeecmascript/data | |
parent | 2413cc1e87c051760210028979b4db8e4c13eca0 (diff) |
Fix "for (... in ...)" loops for list properties.
Task-number: QTBUG-22276
Change-Id: Ibe5a1180044d8e4a6ca6458e8170dd027885ad10
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/forInLoop.qml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/forInLoop.qml b/tests/auto/declarative/qdeclarativeecmascript/data/forInLoop.qml new file mode 100644 index 0000000000..f14367f177 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/forInLoop.qml @@ -0,0 +1,13 @@ +import QtQuick 2.0 + +QtObject { + property list<QtObject> objects + objects: [QtObject { objectName: "obj1" }, QtObject { objectName: "obj2" }, QtObject { objectName: "obj3" }] + property string listResult + + function listProperty() { + for (var i in objects) + listResult += i + "=" + objects[i].objectName + "|" + } +} + |