diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-22 13:16:59 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-22 13:16:59 +0100 |
commit | 503eec194ea8bc70bfdbfd06bd0832a77cfcc137 (patch) | |
tree | 6b32fb2c0d59f2efac71432fe3509af0aad2b8b0 /tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml | |
parent | 99eac6e3fb53dc1ca6f8136a02f93c33be3ef52f (diff) | |
parent | d815621963cee5571ed93fb89561c4884a685b6b (diff) |
Merge "Merge branch 'dev' into stable" into refs/staging/stable
Diffstat (limited to 'tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml')
-rw-r--r-- | tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml b/tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml new file mode 100644 index 0000000000..58bf1ccd04 --- /dev/null +++ b/tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml @@ -0,0 +1,20 @@ +import QtQuick 2.0 + +ListModel { + id: model + property bool ok : false + + Component.onCompleted: { + model.append({"attrs": []}) + model.get(0) + model.set(0, {"attrs": [{'abc': 123, 'def': 456}] } ) + ok = ( model.get(0).attrs.get(0).abc == 123 + && model.get(0).attrs.get(0).def == 456 ) + + model.set(0, {"attrs": [{'abc': 789, 'def': 101}] } ) + ok = ( model.get(0).attrs.get(0).abc == 789 + && model.get(0).attrs.get(0).def == 101 ) + + } +} + |