]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmodel.cpp
Now that we changed some needed stuff at naturalCompare() method, we can set the...
[dolphin.git] / src / dolphinmodel.cpp
index e74df4d3f01f14a34df22b17e072377281f96dc0..8a5b6c73215df52b3aecf12d22eb60b1ade5bfe7 100644 (file)
@@ -47,6 +47,8 @@
 #include <QDir>
 #include <QFileInfo>
 
+static const char *others = I18N_NOOP2("@title:group Name", "Others");
+
 DolphinModel::DolphinModel(QObject *parent)
     : KDirModel(parent)
 {
@@ -89,7 +91,7 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
                             if (name.size() > 1 && name.at(1).isLetter()) {
                                 retString = name.at(1).toUpper();
                             } else {
-                                retString = i18nc("@title:group Name", "Others");
+                                retString = i18nc("@title:group Name", others);
                             }
                         } else {
                             retString = name.at(0).toUpper();
@@ -103,14 +105,14 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
                             if (currA->isLetter()) {
                                 validCategory = true;
                             } else if (currA->isDigit()) {
-                                return i18nc("@title:group", "Others");
+                                return i18nc("@title:group Name", others);
                             } else {
                                 ++currA;
                             }
                         }
 
                         if (!validCategory) {
-                            retString = validCategory ? *currA : i18nc("@title:group Name", "Others");
+                            retString = validCategory ? *currA : i18nc("@title:group Name", others);
                         } else {
                             retString = *currA;
                         }
@@ -241,6 +243,10 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const
         switch (index.column()) {
         case KDirModel::Name: {
             retVariant = data(index, KCategorizedSortFilterProxyModel::CategoryDisplayRole);
+
+            if (retVariant == i18nc("@title:group Name", others))
+                retVariant = QString(QChar(QChar::ReplacementCharacter));
+
             break;
         }