summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/maillistmodel.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-04 09:59:58 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-04 10:02:33 +0200
commita69789502feb0235bddad0cf3cb9ed9ca7554632 (patch)
treedd9f02fc5f87eb4152cbf42b49bfd17f243d56af /framework/src/domain/maillistmodel.cpp
parent9d196fecae23a1f1d2f7922a180e3122547f9e4c (diff)
downloadkube-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.cpp9
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
406void MailListModel::setEntityId(const QString &id) 406void 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);