From 697dd63b1d3ca65fa69e2bc4053161a408fa81bf Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 14 Nov 2016 17:06:02 +0100 Subject: Adapt to api changes --- framework/domain/accountsmodel.cpp | 2 +- framework/domain/folderlistmodel.cpp | 9 +++++---- framework/domain/identitiesmodel.cpp | 2 +- framework/domain/maillistmodel.cpp | 5 ++--- framework/domain/mimetreeparser/interface.h | 1 + framework/domain/outboxmodel.cpp | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) (limited to 'framework/domain') diff --git a/framework/domain/accountsmodel.cpp b/framework/domain/accountsmodel.cpp index 1f034283..ea37784b 100644 --- a/framework/domain/accountsmodel.cpp +++ b/framework/domain/accountsmodel.cpp @@ -22,7 +22,7 @@ AccountsModel::AccountsModel(QObject *parent) : QIdentityProxyModel() { Sink::Query query; - query.liveQuery = true; + query.setFlags(Sink::Query::LiveQuery); query.request(); query.request(); query.request(); diff --git a/framework/domain/folderlistmodel.cpp b/framework/domain/folderlistmodel.cpp index e96488c8..d82f4550 100644 --- a/framework/domain/folderlistmodel.cpp +++ b/framework/domain/folderlistmodel.cpp @@ -31,9 +31,9 @@ FolderListModel::FolderListModel(QObject *parent) : QSortFilterProxyModel() sort(0, Qt::AscendingOrder); Query query; - query.liveQuery = true; + query.setFlags(Sink::Query::LiveQuery); query.request().request().request(); - query.parentProperty = "parent"; + query.requestTree(); runQuery(query); } @@ -83,11 +83,12 @@ void FolderListModel::setAccountId(const QVariant &accountId) //Get all folders of an account auto query = Query(); query.resourceFilter(account); - query.liveQuery = true; + query.setFlags(Sink::Query::LiveQuery); + query.requestTree(); query.request() .request() .request(); - query.parentProperty = Folder::Parent::name; + query.requestTree(); runQuery(query); } diff --git a/framework/domain/identitiesmodel.cpp b/framework/domain/identitiesmodel.cpp index 1958d2f5..8f5c4963 100644 --- a/framework/domain/identitiesmodel.cpp +++ b/framework/domain/identitiesmodel.cpp @@ -22,7 +22,7 @@ IdentitiesModel::IdentitiesModel(QObject *parent) : QIdentityProxyModel() { Sink::Query query; - query.liveQuery = true; + query.setFlags(Sink::Query::LiveQuery); query.requestedProperties << "name" << "username" << "address" << "account"; runQuery(query); } diff --git a/framework/domain/maillistmodel.cpp b/framework/domain/maillistmodel.cpp index 5960f5b4..17b98c2b 100644 --- a/framework/domain/maillistmodel.cpp +++ b/framework/domain/maillistmodel.cpp @@ -131,8 +131,8 @@ void MailListModel::setParentFolder(const QVariant &parentFolder) return; } Sink::Query query = Sink::StandardQueries::threadLeaders(*folder); - query.liveQuery = true; - query.limit = 100; + query.setFlags(Sink::Query::LiveQuery); + query.limit(100); query.request(); query.request(); query.request(); @@ -161,7 +161,6 @@ void MailListModel::setMail(const QVariant &variant) return; } Sink::Query query = Sink::StandardQueries::completeThread(*mail); - query.liveQuery = false; query.request(); query.request(); query.request(); diff --git a/framework/domain/mimetreeparser/interface.h b/framework/domain/mimetreeparser/interface.h index 3ff29d5d..1c6fd31d 100644 --- a/framework/domain/mimetreeparser/interface.h +++ b/framework/domain/mimetreeparser/interface.h @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/framework/domain/outboxmodel.cpp b/framework/domain/outboxmodel.cpp index f2827f82..49af8f73 100644 --- a/framework/domain/outboxmodel.cpp +++ b/framework/domain/outboxmodel.cpp @@ -34,7 +34,7 @@ OutboxModel::OutboxModel(QObject *parent) using namespace Sink::ApplicationDomain; auto query = Sink::StandardQueries::outboxMails(); - query.liveQuery = true; + query.setFlags(Sink::Query::LiveQuery); query.request(); query.request(); query.request(); -- cgit v1.2.3