diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-04 09:59:58 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-04 10:02:33 +0200 |
commit | a69789502feb0235bddad0cf3cb9ed9ca7554632 (patch) | |
tree | dd9f02fc5f87eb4152cbf42b49bfd17f243d56af /framework/src/domain/maillistmodel.cpp | |
parent | 9d196fecae23a1f1d2f7922a180e3122547f9e4c (diff) | |
download | kube-a69789502feb0235bddad0cf3cb9ed9ca7554632.tar.gz kube-a69789502feb0235bddad0cf3cb9ed9ca7554632.zip |
Introduced a logmodel
To get rid of weird problems of lists converting to qmllistmodels.
I'm relatively sure some crashes I've seen were related to this.
Diffstat (limited to 'framework/src/domain/maillistmodel.cpp')
-rw-r--r-- | framework/src/domain/maillistmodel.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/framework/src/domain/maillistmodel.cpp b/framework/src/domain/maillistmodel.cpp index 5936c792..152b4f23 100644 --- a/framework/src/domain/maillistmodel.cpp +++ b/framework/src/domain/maillistmodel.cpp | |||
@@ -406,6 +406,15 @@ bool MailListModel::showInbox() const | |||
406 | void MailListModel::setEntityId(const QString &id) | 406 | void MailListModel::setEntityId(const QString &id) |
407 | { | 407 | { |
408 | qDebug() << "Running mail query for mail with ID:" << id; | 408 | qDebug() << "Running mail query for mail with ID:" << id; |
409 | if (id.isEmpty()) { | ||
410 | mCurrentQueryItem.clear(); | ||
411 | setSourceModel(nullptr); | ||
412 | return; | ||
413 | } | ||
414 | if (mCurrentQueryItem == id) { | ||
415 | return; | ||
416 | } | ||
417 | mCurrentQueryItem = id.toLatin1(); | ||
409 | using namespace Sink::ApplicationDomain; | 418 | using namespace Sink::ApplicationDomain; |
410 | Sink::Query query; | 419 | Sink::Query query; |
411 | query.setFlags(Sink::Query::LiveQuery); | 420 | query.setFlags(Sink::Query::LiveQuery); |