goes on category "Others".
svn path=/trunk/KDE/kdebase/apps/; revision=677225
else if (item->isHidden())
retString = data.toString().toUpper().at(0);
else
- retString = i18n("Others");
+ {
+ bool validCategory = false;
+
+ const QChar* currA = data.toString().toUpper().unicode(); // iterator over a
+ while (!currA->isNull() && !validCategory) {
+ if (currA->isLetter())
+ validCategory = true;
+ else if (currA->isDigit())
+ return i18n("Others");
+ else
+ ++currA;
+ }
+
+ if (!validCategory)
+ retString = i18n("Others");
+ else
+ retString = *currA;
+ }
}
break;
// We don't care about case for building categories. We also don't
// want here to compare by a natural comparation
- return QString::compare(leftFileName, rightFileName, Qt::CaseInsensitive) < 0;
+ return naturalCompare(leftFileName, rightFileName) < 0;
}
else if (sortRole() == DolphinView::SortBySize) { // If we are sorting by size
// If we are sorting by size, show folders first. We will sort them