KFileItemModel: Always use upper case letters to group by name

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".
This commit is contained in:
Frank Reininghaus 2011-12-20 02:03:31 +01:00
parent 404d54fc4a
commit a3c41997db

View 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) {