]> cloud.milkyroute.net Git - dolphin.git/commitdiff
KFileItemModel: Always use upper case letters to group by name
authorFrank Reininghaus <frank78ac@googlemail.com>
Tue, 20 Dec 2011 01:03:31 +0000 (02:03 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Tue, 20 Dec 2011 01:03:31 +0000 (02:03 +0100)
This fixes the following problems:
1. In a folder containing the items ~a and b, the first group,
   containing ~a, is named "Others".
2. In a folder containing the items a, ~b, ~c, and ~d, the first group
   "A" contains a and ~b, and the other two items are in the group
   "Others".

src/kitemviews/kfileitemmodel.cpp

index 2e583d05e2434b46ede6a6eb8eadcb4c08f9da19..748a9bae1105dda57e2465cf7ecf2cd88681b5e9 100644 (file)
@@ -1556,7 +1556,7 @@ QList<QPair<int, QVariant> > KFileItemModel::nameRoleGroups() const
         // Use the first character of the name as group indication
         QChar newFirstChar = name.at(0).toUpper();
         if (newFirstChar == QLatin1Char('~') && name.length() > 1) {
-            newFirstChar = name.at(1);
+            newFirstChar = name.at(1).toUpper();
         }
 
         if (firstChar != newFirstChar) {