From f76f3a165419b048f9f8bcdfcb40042397b9af9b Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sun, 27 Jan 2013 15:19:39 +0100 Subject: Move the consistency check for KFileItemModel from the test to the class This makes it possible to check the model's consistency also in other places, e.g., in KFileItemModel's benchmark. --- src/tests/kfileitemmodelbenchmark.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tests/kfileitemmodelbenchmark.cpp') diff --git a/src/tests/kfileitemmodelbenchmark.cpp b/src/tests/kfileitemmodelbenchmark.cpp index f1be69da3..7017863ab 100644 --- a/src/tests/kfileitemmodelbenchmark.cpp +++ b/src/tests/kfileitemmodelbenchmark.cpp @@ -183,6 +183,8 @@ void KFileItemModelBenchmark::insertAndRemoveManyItems() QCOMPARE(model.count(), initialItems.count() + newItems.count() - removedItems.count()); } + QVERIFY(model.isConsistent()); + for (int i = 0; i < model.count(); ++i) { QCOMPARE(model.fileItem(i), expectedFinalItems.at(i)); } -- cgit v1.3