From 5dab398f76b2d2c6dfdce9ee068c226c9ab20e5b Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 15 Mar 2016 14:44:28 +0100 Subject: Support syncing all resources --- common/store.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/store.cpp b/common/store.cpp index 68f73c8..2c1dcad 100644 --- a/common/store.cpp +++ b/common/store.cpp @@ -45,7 +45,7 @@ QString Store::storageLocation() return Sink::storageLocation(); } -static QList getResources(const QList &resourceFilter, const QByteArray &type) +static QList getResources(const QList &resourceFilter, const QByteArray &type = QByteArray()) { // Return the global resource (signified by an empty name) for types that don't eblong to a specific resource if (type == "sinkresource") { @@ -163,7 +163,8 @@ KAsync::Job Store::removeDataFromDisk(const QByteArray &identifier) KAsync::Job Store::synchronize(const Sink::Query &query) { Trace() << "synchronize" << query.resources; - return KAsync::iterate(query.resources) + auto resources = getResources(query.resources); + return KAsync::iterate(resources) .template each([query](const QByteArray &resource, KAsync::Future &future) { Trace() << "Synchronizing " << resource; auto resourceAccess = ResourceAccessFactory::instance().getAccess(resource); -- cgit v1.2.3