X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/9c2b206f0ab78b4809c29d54d841ff379cd8877d..2df2d4ea7ee63a43a327b4ffb1c5cddd176aff91:/src/dolphinmodel.cpp diff --git a/src/dolphinmodel.cpp b/src/dolphinmodel.cpp index e57aa90d8..819b37d2a 100644 --- a/src/dolphinmodel.cpp +++ b/src/dolphinmodel.cpp @@ -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,12 @@ QVariant DolphinModel::sortRoleData(const QModelIndex& index) const break; case KDirModel::Type: - if (item.isDir()) - retVariant.clear(); // when sorting we want folders to be placed first - else + if (item.isDir()) { + // when sorting we want folders to be placed first + retVariant = QString(); // krazy:exclude=nullstrassign + } else { retVariant = item.mimeComment(); + } break; #ifdef HAVE_NEPOMUK