[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [zanshin] src: fix sorting by due date
From:       Matthias Kretz <kretz () kde ! org>
Date:       2012-02-03 15:30:28
Message-ID: 20120203153028.B152DA60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 4135a9d4f9f8e4a67dd3deb348fbebfbdb8e888a by Matthias Kretz.
Committed on 01/02/2012 at 18:03.
Pushed by mkretz into branch 'master'.

fix sorting by due date

Since this method returned a QString instead of a QDate the sorting was
according to the textual date representation. So, basically Fri, Mon,
Sat, Sun, Thu, Tue, Wed. This must return a QDate to function properly.
Formatting the QDate for display must be done in the Delegate.

BUG: 292951

M  +1    -1    src/todomodel.cpp

http://commits.kde.org/zanshin/4135a9d4f9f8e4a67dd3deb348fbebfbdb8e888a

diff --git a/src/todomodel.cpp b/src/todomodel.cpp
index 2eb943c..c38e909 100644
--- a/src/todomodel.cpp
+++ b/src/todomodel.cpp
@@ -101,7 +101,7 @@ QVariant TodoModel::entityData(const Akonadi::Item &ite=
m, int column, int role)
         case 2:
             return todoFromItem(item)->categories().join(", ");
         case 3:
-            return todoFromItem(item)->dtDue().date().toString();
+            return todoFromItem(item)->dtDue().date();
         case 4:
             return modelIndexForCollection(this, item.parentCollection()).=
data();
         }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic