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
This commit is contained in:
Peter Penz 2010-01-22 14:05:09 +00:00
parent 82bf5d99c1
commit 0ad9abf7b1

View 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) {