From 7e30467679a403f953e2547894febb51e8a3d78b Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sat, 7 Sep 2013 18:06:45 +0200 Subject: Make expandedParentsCount() work without accessing the data hash The idea is that we no longer assume that the "expandedParentsCount" for each item will be stored in the QHash. It is only accessed for items which are expanded, and which are not top-level items (i.e., which have an expandedParentsCount > 1). Some unit tests are added to improve the coverage of the affected code. REVIEW: 112562 --- src/kitemviews/kfileitemmodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/kitemviews/kfileitemmodel.h') diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 5917e6818..f364e7ce0 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -319,6 +319,8 @@ private: */ QList createItemDataList(const KUrl& parentUrl, const KFileItemList& items) const; + static int expandedParentsCount(const ItemData* data); + void removeExpandedItems(); /** -- cgit v1.3.1