diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-06-09 23:32:20 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-06-09 23:32:20 (GMT) |
commit | 96032bd846c7188ce2655d2402c7a745e91a5168 (patch) | |
tree | b88cdf1d945c629872a01ce828062dc08f5dc251 /tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp | |
parent | c85bf4b51331496fcfb8befb4cdcc56d2fa0a213 (diff) | |
download | Qt-96032bd846c7188ce2655d2402c7a745e91a5168.zip Qt-96032bd846c7188ce2655d2402c7a745e91a5168.tar.gz Qt-96032bd846c7188ce2655d2402c7a745e91a5168.tar.bz2 |
Fix crash when changing ListView model with highlightRangeMode: ListView.StrictlyEnforceRange
Task-number: QTBUG-11328
Diffstat (limited to 'tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 9b7c261..4e35bc0 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -1110,6 +1110,13 @@ void tst_QDeclarativeGridView::enforceRange() gridview->setCurrentIndex(5); QTRY_COMPARE(gridview->contentY(), 100.); + TestModel model2; + for (int i = 0; i < 5; i++) + model2.addItem("Item" + QString::number(i), ""); + + ctxt->setContextProperty("testModel", &model2); + QCOMPARE(gridview->count(), 5); + delete canvas; } |