]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmodel.cpp
* Adjust code to use the improved KUrlNavigator API.
[dolphin.git] / src / dolphinmodel.cpp
index 3467c8a3822056df2905fcbe28a79f9a5c851ba2..f7fd2b3502dad446972a95cde046bf64ac3b127d 100644 (file)
@@ -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) {