summaryrefslogtreecommitdiffstats
path: root/common/store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/store.cpp')
-rw-r--r--common/store.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/common/store.cpp b/common/store.cpp
index 6aae00f..8b8de1f 100644
--- a/common/store.cpp
+++ b/common/store.cpp
@@ -255,23 +255,7 @@ KAsync::Job<void> Store::removeDataFromDisk(const QByteArray &identifier)
255 255
256KAsync::Job<void> Store::synchronize(const Sink::Query &query) 256KAsync::Job<void> Store::synchronize(const Sink::Query &query)
257{ 257{
258 auto resources = getResources(query.getResourceFilter()).keys(); 258 return synchronize(Sink::SyncScope{static_cast<Sink::QueryBase>(query)});
259 SinkTrace() << "synchronize" << resources;
260 return KAsync::value(resources)
261 .template each([query](const QByteArray &resource) {
262 SinkTrace() << "Synchronizing " << resource;
263 auto resourceAccess = ResourceAccessFactory::instance().getAccess(resource, ResourceConfig::getResourceType(resource));
264 return resourceAccess->synchronizeResource(true, false)
265 .addToContext(resourceAccess)
266 .then<void>([](const KAsync::Error &error) {
267 if (error) {
268 SinkWarning() << "Error during sync.";
269 return KAsync::error<void>(error);
270 }
271 SinkTrace() << "synced.";
272 return KAsync::null<void>();
273 });
274 });
275} 259}
276 260
277KAsync::Job<void> Store::synchronize(const Sink::SyncScope &scope) 261KAsync::Job<void> Store::synchronize(const Sink::SyncScope &scope)