X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/eaeee9f7d68d120b1982f24e73d8183db3418261..7eeb8dba6aeba09aa3dfa7fa5f0b00840d4d8317:/src/dolphinmodel.cpp diff --git a/src/dolphinmodel.cpp b/src/dolphinmodel.cpp index 3467c8a38..746752b67 100644 --- a/src/dolphinmodel.cpp +++ b/src/dolphinmodel.cpp @@ -41,7 +41,7 @@ #include #include -const char* DolphinModel::m_others = I18N_NOOP2("@title:group Name", "Others"); +const char* const DolphinModel::m_others = I18N_NOOP2("@title:group Name", "Others"); DolphinModel::DolphinModel(QObject* parent) : KDirModel(parent), @@ -251,6 +251,11 @@ QVariant DolphinModel::displayRoleData(const QModelIndex& index) const } if (currentDate.year() == modifiedDate.year() && currentDate.month() == modifiedDate.month()) { + if (modifiedWeek > currentWeek) { + // use case: modified date = 2010-01-01, current date = 2010-01-22 + // modified week = 53, current week = 3 + modifiedWeek = 0; + } switch (currentWeek - modifiedWeek) { case 0: switch (daysDistance) {