┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-10-24 00:22:03 +0200
committerPeter Penz <[email protected]>2011-10-24 00:22:27 +0200
commit54b5a283765f168575f2eaeff95c93dbeca3d63d (patch)
tree2cb153973acbc55ddbcb8be31036e1f124de07ed /src/kitemviews/kfileitemmodel.cpp
parent517ebd721e12e3a4a3430ac3cba8ce99b33c5b0e (diff)
Make group-headers less ugly
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp7
1 files changed, 7 insertions, 0 deletions
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<QPair<int, QVariant> > 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