aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-05-06 12:22:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-07 14:46:50 +0200
commit556846aa1fd5594156116c33ebf57b1f58fff53e (patch)
tree96ca09ac395959bccdfcb929c3a993786723fef7 /tests/auto/quick/qquicklistview
parentac9f1332c2a66203d3039626512773a28fd8dca0 (diff)
Item views: prevent negative cache buffer
A negative cache buffer does not make much sense, and the item views would go crazy and start creating/destructing delegates endlessly. Task-number: QTBUG-38725 Change-Id: I1fbba1f3130a99af67fbc4c2aba4d3199d0554a9 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'tests/auto/quick/qquicklistview')
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 29755e3890..5cc3c7e642 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -3012,6 +3012,10 @@ void tst_QQuickListView::cacheBuffer()
controller.incubateWhile(&b);
}
+ // negative cache buffer is ignored
+ listview->setCacheBuffer(-1);
+ QCOMPARE(listview->cacheBuffer(), 200);
+
delete window;
delete testObject;
}