From 0397658b81ce371047d9ce6979aa37d8112f1a2c Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 14 Feb 2012 18:04:47 +0100 Subject: Details view: Fix indicator-branches Up to now no indicator-branches have been drawn when showing a tree. The patch fixes this so that that the style-dependent branches are drawn. The main part of the patch is the implementation of KItemListView::updateSiblingsInformation(). Most of the other changes are related due to an internal renaming of the expansionsLevel-role to expandedParentsCount and some related cleanups. BUG: 290276 FIXED-IN: 4.8.1 --- src/tests/kfileitemmodeltest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tests') diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp index d0accd68a..ea67b85f4 100644 --- a/src/tests/kfileitemmodeltest.cpp +++ b/src/tests/kfileitemmodeltest.cpp @@ -373,7 +373,7 @@ void KFileItemModelTest::testExpandItems() // yields the correct result for "a/a/1" and "a/a-1/", whis is non-trivial because they share the // first three characters. QSet modelRoles = m_model->roles(); - modelRoles << "isExpanded" << "isExpandable" << "expansionLevel"; + modelRoles << "isExpanded" << "isExpandable" << "expandedParentsCount"; m_model->setRoles(modelRoles); QStringList files; @@ -490,7 +490,7 @@ void KFileItemModelTest::testExpandParentItems() // a2/b2/c2/ // a2/b2/c2/d2/ QSet modelRoles = m_model->roles(); - modelRoles << "isExpanded" << "isExpandable" << "expansionLevel"; + modelRoles << "isExpanded" << "isExpandable" << "expandedParentsCount"; m_model->setRoles(modelRoles); QStringList files; @@ -665,7 +665,7 @@ void KFileItemModelTest::testExpansionLevelsCompare() b.item = itemB; b.parent = 0; - QCOMPARE(m_model->expansionLevelsCompare(&a, &b), result); + QCOMPARE(m_model->expandedParentsCountCompare(&a, &b), result); } void KFileItemModelTest::testIndexForKeyboardSearch() -- cgit v1.3