From 4f5a2eb943792af51fa2125725c356ca1090113e Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sun, 10 Feb 2013 18:06:07 +0100 Subject: Include parent-child relationships in KFileItemModel's consistency check --- src/tests/kfileitemmodeltest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tests') diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp index 2ad18428a..85a46488f 100644 --- a/src/tests/kfileitemmodeltest.cpp +++ b/src/tests/kfileitemmodeltest.cpp @@ -486,6 +486,7 @@ void KFileItemModelTest::testExpandItems() QCOMPARE(spyRemoved.count(), 1); itemRangeList = spyRemoved.takeFirst().at(0).value(); QCOMPARE(itemRangeList, KItemRangeList() << KItemRange(1, 4)); // 4 items removed + QVERIFY(m_model->isConsistent()); // Clear the model, reload the folder and try to restore the expanded folders. m_model->clear(); @@ -502,6 +503,7 @@ void KFileItemModelTest::testExpandItems() QVERIFY(m_model->isExpanded(3)); QVERIFY(!m_model->isExpanded(4)); QCOMPARE(m_model->expandedDirectories(), allFolders); + QVERIFY(m_model->isConsistent()); // Move to a sub folder, then call restoreExpandedFolders() *before* going back. // This is how DolphinView restores the expanded folders when navigating in history. @@ -564,6 +566,7 @@ void KFileItemModelTest::testExpandParentItems() QVERIFY(m_model->isExpanded(2)); QVERIFY(m_model->isExpanded(3)); QVERIFY(!m_model->isExpanded(4)); + QVERIFY(m_model->isConsistent()); } void KFileItemModelTest::testSorting() -- cgit v1.3