diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/domain/maillistmodel.cpp | 6 |
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 | ||
87 | bool MailListModel::lessThan(const QModelIndex &left, const QModelIndex &right) const | 87 | bool 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 | ||
94 | void MailListModel::runQuery(const Sink::Query &query) | 94 | void MailListModel::runQuery(const Sink::Query &query) |