diff options
author | Rémi Nicole <nicole@kolabsystems.com> | 2018-02-26 18:19:43 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-02-26 18:20:13 +0100 |
commit | 331f75d4da056ddb235be45a3784d2c19e545211 (patch) | |
tree | 64adc5432725e6d484012acfcea64b95b5d1711f /framework/src/domain/maillistmodel.cpp | |
parent | 2dc4d380f8c0cc90aa0dec67a826703c3ceb34af (diff) | |
download | kube-331f75d4da056ddb235be45a3784d2c19e545211.tar.gz kube-331f75d4da056ddb235be45a3784d2c19e545211.zip |
Improvements of the log view
Summary:
- Add a test view for the log view
- Allow passing the `entities` part of Sink messages
- That allowed getting information about which mail could not be sent in sink transmission errors
Reviewers: cmollekopf
Reviewed By: cmollekopf
Differential Revision: https://phabricator.kde.org/D10861
Diffstat (limited to 'framework/src/domain/maillistmodel.cpp')
-rw-r--r-- | framework/src/domain/maillistmodel.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/framework/src/domain/maillistmodel.cpp b/framework/src/domain/maillistmodel.cpp index e2f52d13..143c8a60 100644 --- a/framework/src/domain/maillistmodel.cpp +++ b/framework/src/domain/maillistmodel.cpp | |||
@@ -400,3 +400,36 @@ bool MailListModel::showInbox() const | |||
400 | { | 400 | { |
401 | return false; | 401 | return false; |
402 | } | 402 | } |
403 | |||
404 | void MailListModel::setEntityId(const QString &id) | ||
405 | { | ||
406 | qDebug() << "Running mail query for mail with ID:" << id; | ||
407 | using namespace Sink::ApplicationDomain; | ||
408 | Sink::Query query; | ||
409 | query.setFlags(Sink::Query::LiveQuery); | ||
410 | query.filter(id.toUtf8()); | ||
411 | query.request<Mail::Subject>(); | ||
412 | query.request<Mail::Sender>(); | ||
413 | query.request<Mail::To>(); | ||
414 | query.request<Mail::Cc>(); | ||
415 | query.request<Mail::Bcc>(); | ||
416 | query.request<Mail::Date>(); | ||
417 | query.request<Mail::Unread>(); | ||
418 | query.request<Mail::Important>(); | ||
419 | query.request<Mail::Draft>(); | ||
420 | query.request<Mail::Folder>(); | ||
421 | query.request<Mail::Sent>(); | ||
422 | query.request<Mail::Trash>(); | ||
423 | query.request<Mail::MimeMessage>(); | ||
424 | query.request<Mail::FullPayloadAvailable>(); | ||
425 | mFetchMails = true; | ||
426 | mFetchedMails.clear(); | ||
427 | // Latest mail at the top | ||
428 | sort(0, Qt::DescendingOrder); | ||
429 | runQuery(query); | ||
430 | } | ||
431 | |||
432 | QString MailListModel::entityId() const | ||
433 | { | ||
434 | return {}; | ||
435 | } | ||