svn path=/trunk/KDE/kdebase/apps/; revision=745354
This commit is contained in:
Rafael Fernández López 2007-12-06 01:25:00 +00:00
parent 02f7ca192d
commit 70e938b23e

View file

@ -47,7 +47,7 @@
#include <QDir> #include <QDir>
#include <QFileInfo> #include <QFileInfo>
static QString others = I18N_NOOP2("@title:group Name", "Uncategorized"); static const char *others = I18N_NOOP2("@title:group Name", "Uncategorized");
DolphinModel::DolphinModel(QObject *parent) DolphinModel::DolphinModel(QObject *parent)
: KDirModel(parent) : KDirModel(parent)
@ -91,7 +91,7 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
if (name.size() > 1 && name.at(1).isLetter()) { if (name.size() > 1 && name.at(1).isLetter()) {
retString = name.at(1).toUpper(); retString = name.at(1).toUpper();
} else { } else {
retString = others; retString = i18nc("@title:group Name", others);
} }
} else { } else {
retString = name.at(0).toUpper(); retString = name.at(0).toUpper();
@ -105,14 +105,14 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
if (currA->isLetter()) { if (currA->isLetter()) {
validCategory = true; validCategory = true;
} else if (currA->isDigit()) { } else if (currA->isDigit()) {
return others; return i18nc("@title:group Name", others);
} else { } else {
++currA; ++currA;
} }
} }
if (!validCategory) { if (!validCategory) {
retString = validCategory ? *currA : others; retString = validCategory ? *currA : i18nc("@title:group Name", others);
} else { } else {
retString = *currA; retString = *currA;
} }
@ -244,7 +244,7 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
case KDirModel::Name: { case KDirModel::Name: {
retVariant = data(index, KCategorizedSortFilterProxyModel::CategoryDisplayRole); retVariant = data(index, KCategorizedSortFilterProxyModel::CategoryDisplayRole);
if (retVariant == others) if (retVariant == i18nc("@title:group Name", others))
retVariant = QString(); retVariant = QString();
break; break;