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:
Rafael Fernández López 2007-12-04 02:24:23 +00:00
parent d305bee019
commit 7ed2884204

View file

@ -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;