summaryrefslogtreecommitdiffstats
path: root/framework/domain/identitiesmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/domain/identitiesmodel.cpp')
-rw-r--r--framework/domain/identitiesmodel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/domain/identitiesmodel.cpp b/framework/domain/identitiesmodel.cpp
index 49c08005..0d97fc6a 100644
--- a/framework/domain/identitiesmodel.cpp
+++ b/framework/domain/identitiesmodel.cpp
@@ -84,11 +84,12 @@ QVariant IdentitiesModel::data(const QModelIndex &idx, int role) const
84 84
85void IdentitiesModel::runQuery(const Sink::Query &query) 85void IdentitiesModel::runQuery(const Sink::Query &query)
86{ 86{
87 mModel = Sink::Store::loadModel<Sink::ApplicationDomain::Identity>(query); 87 using namespace Sink::ApplicationDomain;
88 mModel = Sink::Store::loadModel<Identity>(query);
88 setSourceModel(mModel.data()); 89 setSourceModel(mModel.data());
89 90
90 Sink::Store::fetchAll<Sink::ApplicationDomain::SinkAccount>(Sink::Query()) 91 Sink::Store::fetchAll<SinkAccount>(Sink::Query{}.request<SinkAccount::Icon>().request<SinkAccount::Name>())
91 .then([this](const QList<Sink::ApplicationDomain::SinkAccount::Ptr> &accounts) { 92 .then([this](const QList<SinkAccount::Ptr> &accounts) {
92 for (const auto &account : accounts) { 93 for (const auto &account : accounts) {
93 mAccountNames.insert(account->identifier(), account->getName()); 94 mAccountNames.insert(account->identifier(), account->getName());
94 mAccountIcons.insert(account->identifier(), account->getIcon()); 95 mAccountIcons.insert(account->identifier(), account->getIcon());