diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-02-02 03:20:11 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2011-02-02 03:20:11 (GMT) |
commit | 49df52abc004419f35bb6b508fb681c028a7c679 (patch) | |
tree | 506c1872db84c0ec67417210806fa4324b792937 /tests | |
parent | 88b072b3644cfd960367096ae0103e8ddef0d06d (diff) | |
download | Qt-49df52abc004419f35bb6b508fb681c028a7c679.zip Qt-49df52abc004419f35bb6b508fb681c028a7c679.tar.gz Qt-49df52abc004419f35bb6b508fb681c028a7c679.tar.bz2 |
Avoid index-out-of bounds related crash in Grid
Task-number: QTBUG-16959
Reviewed-by: Martin Jones
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml b/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml index 1cba598..f93ce67 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml @@ -12,9 +12,27 @@ Item { height: 50 z: {if(index == 0){2;}else if(index == 1){1;} else{3;}} objectName: {if(index == 0){"one";}else if(index == 1){"two";} else{"three";}} - } } } } + + //This crashed once (QTBUG-16959) because the repeater ended up on the end of the list + //If this grid just instantiates without crashing, then it has not regressed. + Grid { + id: grid + rows: 2 + flow: Grid.TopToBottom + + Repeater { + model: 13 + Rectangle { + color: "goldenrod" + width: 100 + height: 100 + radius: 10 + border.width: 1 + } + } + } } |