diff options
| author | Peter Penz <[email protected]> | 2010-01-22 14:05:09 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-01-22 14:05:09 +0000 |
| commit | 0ad9abf7b1621a834d272c55d3989e53b6abf30e (patch) | |
| tree | 2a45b6f0ff8cb4a83ae3c81f5e3634eff46fad2f | |
| parent | 82bf5d99c11b6f236c5bb0aac262a7d75fb8fe77 (diff) | |
Fixed crash, if the categorizied view sorted by date is used. Use case: modified date = 2010-01-01 (= week number 53), current date = 2010-01-22 (= week number 3).
BUG: 223651
svn path=/trunk/KDE/kdebase/apps/; revision=1078626
| -rw-r--r-- | src/dolphinmodel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dolphinmodel.cpp b/src/dolphinmodel.cpp index 3467c8a38..f7fd2b350 100644 --- a/src/dolphinmodel.cpp +++ b/src/dolphinmodel.cpp @@ -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) { |
