summaryrefslogtreecommitdiffstats
path: root/common/store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/store.cpp')
-rw-r--r--common/store.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/store.cpp b/common/store.cpp
index d266098..0eefe69 100644
--- a/common/store.cpp
+++ b/common/store.cpp
@@ -277,6 +277,19 @@ KAsync::Job<void> Store::removeDataFromDisk(const QByteArray &identifier)
277 }); 277 });
278} 278}
279 279
280KAsync::Job<void> Store::upgrade()
281{
282 SinkLog() << "Upgrading...";
283 return fetchAll<ApplicationDomain::SinkResource>({})
284 .template each([](const ApplicationDomain::SinkResource::Ptr &resource) -> KAsync::Job<void> {
285 SinkLog() << "Removing caches for " << resource->identifier();
286 return removeDataFromDisk(resource->identifier());
287 })
288 .then([] {
289 SinkLog() << "Upgrade complete.";
290 });
291}
292
280static KAsync::Job<void> synchronize(const QByteArray &resource, const Sink::SyncScope &scope) 293static KAsync::Job<void> synchronize(const QByteArray &resource, const Sink::SyncScope &scope)
281{ 294{
282 SinkLog() << "Synchronizing " << resource << scope; 295 SinkLog() << "Synchronizing " << resource << scope;