mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
save time... no need to translate to upper the whole string if we only are interested in a single character
svn path=/trunk/KDE/kdebase/apps/; revision=744662
This commit is contained in:
parent
d305bee019
commit
7ed2884204
1 changed files with 4 additions and 4 deletions
|
@ -83,17 +83,17 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
|
|||
QVariant data = theIndex.model()->data(theIndex, Qt::DisplayRole);
|
||||
if (data.toString().size()) {
|
||||
if (!item.isHidden() && data.toString().at(0).isLetter())
|
||||
retString = data.toString().toUpper().at(0);
|
||||
retString = data.toString().at(0).toUpper();
|
||||
else if (item.isHidden() && data.toString().at(0) == '.' &&
|
||||
data.toString().at(1).isLetter())
|
||||
retString = data.toString().toUpper().at(1);
|
||||
retString = data.toString().at(1).toUpper();
|
||||
else if (item.isHidden() && data.toString().at(0) == '.' &&
|
||||
!data.toString().at(1).isLetter())
|
||||
retString = i18nc("@title:group Name", "Others");
|
||||
else if (item.isHidden() && data.toString().at(0) != '.')
|
||||
retString = data.toString().toUpper().at(0);
|
||||
retString = data.toString().at(0).toUpper();
|
||||
else if (item.isHidden())
|
||||
retString = data.toString().toUpper().at(0);
|
||||
retString = data.toString().at(0).toUpper();
|
||||
else
|
||||
{
|
||||
bool validCategory = false;
|
||||
|
|
Loading…
Reference in a new issue