]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmodel.cpp
Fixed regression when refactoring the Information Panel: Don't forget to give a visua...
[dolphin.git] / src / dolphinmodel.cpp
index e57aa90d831bb2f2f463c72310bcd43696ba3207..f37452c80dbf938459916f4419876aaa582ecf34 100644 (file)
@@ -250,7 +250,7 @@ QVariant DolphinModel::displayRoleData(const QModelIndex& index) const
             const QDate lastMonthDate = currentDate.addMonths(-1);
             if  (lastMonthDate.year() == modifiedDate.year() && lastMonthDate.month() == modifiedDate.month()) {
                 if (daysDistance == 1) {
-                    retString = i18nc("@title:group Date: %B is full month name in current locale, and %Y is full year number", "Yesterday (%B, %Y)");
+                    retString = modifiedTime.toString(i18nc("@title:group Date: %B is full month name in current locale, and %Y is full year number", "Yesterday (%B, %Y)"));
                 } else if (daysDistance <= 7) {
                     retString = modifiedTime.toString(i18nc("@title:group The week day name: %A, %B is full month name in current locale, and %Y is full year number", "%A (%B, %Y)"));
                 } else if (daysDistance <= 7 * 2) {
@@ -314,7 +314,7 @@ QVariant DolphinModel::displayRoleData(const QModelIndex& index) const
 
         retString = i18nc("@title:group Files and folders by permissions", "(User: %1) (Group: %2) (Others: %3)", user, group, others);
         break;
-                                 }
+    }
 
     case KDirModel::Owner:
         retString = item.user();
@@ -333,7 +333,7 @@ QVariant DolphinModel::displayRoleData(const QModelIndex& index) const
         const quint32 rating = ratingForIndex(index);
         retString = QString::number(rating);
         break;
-                               }
+    }
 
     case DolphinModel::Tags: {
         retString = tagsForIndex(index);
@@ -410,10 +410,11 @@ QVariant DolphinModel::sortRoleData(const QModelIndex& index) const
         break;
 
     case KDirModel::Type:
-        if (item.isDir())
+        if (item.isDir()) {
             retVariant.clear(); // when sorting we want folders to be placed first
-        else
+        } else {
             retVariant = item.mimeComment();
+        }
         break;
 
 #ifdef HAVE_NEPOMUK