From 54b5a283765f168575f2eaeff95c93dbeca3d63d Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 24 Oct 2011 00:22:03 +0200 Subject: Make group-headers less ugly --- src/kitemviews/kfileitemmodel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/kitemviews/kfileitemmodel.cpp') diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index da2126aa3..5ccca5a94 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1168,6 +1168,13 @@ QList > KFileItemModel::nameRoleGroups() const QChar firstChar; bool isLetter = false; for (int i = 0; i <= maxIndex; ++i) { + if (m_requestRole[ExpansionLevelRole] && m_data.at(i).value("expansionLevel").toInt() > 0) { + // KItemListView would be capable to show sub-groups in groups but + // in typical usecases this results in visual clutter, hence we + // just ignore sub-groups. + continue; + } + const QString name = m_data.at(i).value("name").toString(); // Use the first character of the name as group indication -- cgit v1.3