diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-12-28 12:05:34 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-02 13:31:14 +0100 |
commit | 625190d311adfcf3f0436cfece82249a92489348 (patch) | |
tree | 1010950e14b57560ae90abe20a5657750ad27137 /common/resourcefacade.cpp | |
parent | 11b790ba6f06141db802273628ce2d191982677e (diff) | |
download | sink-625190d311adfcf3f0436cfece82249a92489348.tar.gz sink-625190d311adfcf3f0436cfece82249a92489348.zip |
No parent query
Diffstat (limited to 'common/resourcefacade.cpp')
-rw-r--r-- | common/resourcefacade.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/common/resourcefacade.cpp b/common/resourcefacade.cpp index 0687bbc..3dba3e5 100644 --- a/common/resourcefacade.cpp +++ b/common/resourcefacade.cpp | |||
@@ -110,7 +110,7 @@ LocalStorageQueryRunner<DomainType>::LocalStorageQueryRunner(const Query &query, | |||
110 | }; | 110 | }; |
111 | 111 | ||
112 | QObject *guard = new QObject; | 112 | QObject *guard = new QObject; |
113 | mResultProvider->setFetcher([this, query, guard, &configNotifier, matchesTypeAndIds](const QSharedPointer<DomainType> &) { | 113 | mResultProvider->setFetcher([this, query, guard, &configNotifier, matchesTypeAndIds]() { |
114 | const auto entries = mConfigStore.getEntries(); | 114 | const auto entries = mConfigStore.getEntries(); |
115 | for (const auto &res : entries.keys()) { | 115 | for (const auto &res : entries.keys()) { |
116 | const auto type = entries.value(res); | 116 | const auto type = entries.value(res); |
@@ -127,7 +127,7 @@ LocalStorageQueryRunner<DomainType>::LocalStorageQueryRunner(const Query &query, | |||
127 | mResultProvider->add(entity); | 127 | mResultProvider->add(entity); |
128 | } | 128 | } |
129 | // TODO initialResultSetComplete should be implicit | 129 | // TODO initialResultSetComplete should be implicit |
130 | mResultProvider->initialResultSetComplete(typename DomainType::Ptr(), true); | 130 | mResultProvider->initialResultSetComplete(true); |
131 | mResultProvider->complete(); | 131 | mResultProvider->complete(); |
132 | }); | 132 | }); |
133 | if (query.liveQuery()) { | 133 | if (query.liveQuery()) { |
@@ -390,11 +390,7 @@ QPair<KAsync::Job<void>, typename Sink::ResultEmitter<typename ApplicationDomain | |||
390 | auto resourceAccess = Sink::ResourceAccessFactory::instance().getAccess(resource->identifier(), ResourceConfig::getResourceType(resource->identifier())); | 390 | auto resourceAccess = Sink::ResourceAccessFactory::instance().getAccess(resource->identifier(), ResourceConfig::getResourceType(resource->identifier())); |
391 | monitorResource(accountIdentifier, *resource, resourceAccess); | 391 | monitorResource(accountIdentifier, *resource, resourceAccess); |
392 | }); | 392 | }); |
393 | emitter->onModified([](const ApplicationDomain::SinkResource::Ptr &) {}); | 393 | emitter->fetch(); |
394 | emitter->onRemoved([](const ApplicationDomain::SinkResource::Ptr &) {}); | ||
395 | emitter->onInitialResultSetComplete([](const ApplicationDomain::SinkResource::Ptr &, bool) {}); | ||
396 | emitter->onComplete([]() {}); | ||
397 | emitter->fetch({}); | ||
398 | runner->mResourceEmitter[accountIdentifier] = emitter; | 394 | runner->mResourceEmitter[accountIdentifier] = emitter; |
399 | } | 395 | } |
400 | 396 | ||