summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-21 14:32:46 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-21 14:33:24 +0200
commit2be303e51a515bc7126521079e9ad26386aa677b (patch)
tree4467b068ebe648514b11bed5093c6797bdbe9cfd
parente0de014eba1f739dd054fdf0b9988983aaf37653 (diff)
downloadkube-2be303e51a515bc7126521079e9ad26386aa677b.tar.gz
kube-2be303e51a515bc7126521079e9ad26386aa677b.zip
Fixed mailsorting by date
-rw-r--r--framework/domain/maillistmodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/domain/maillistmodel.cpp b/framework/domain/maillistmodel.cpp
index 4ea7075c..e3f555c4 100644
--- a/framework/domain/maillistmodel.cpp
+++ b/framework/domain/maillistmodel.cpp
@@ -86,9 +86,9 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const
86 86
87bool MailListModel::lessThan(const QModelIndex &left, const QModelIndex &right) const 87bool MailListModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
88{ 88{
89 const QVariant leftData = left.sibling(left.row(), Date).data(Qt::DisplayRole); 89 const auto leftDate = left.data(Sink::Store::DomainObjectRole).value<Sink::ApplicationDomain::Mail::Ptr>()->getDate();
90 const QVariant rightData = right.sibling(right.row(), Date).data(Qt::DisplayRole); 90 const auto rightDate = right.data(Sink::Store::DomainObjectRole).value<Sink::ApplicationDomain::Mail::Ptr>()->getDate();
91 return leftData.toDateTime() < rightData.toDateTime(); 91 return leftDate < rightDate;
92} 92}
93 93
94void MailListModel::runQuery(const Sink::Query &query) 94void MailListModel::runQuery(const Sink::Query &query)