summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-14 20:32:52 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-14 20:32:52 +0100
commitce3a9e1cf5c6118e49a9842687df572294302cf9 (patch)
tree3db01c2485353b380a42fb57f9433c37c0c5a960
parent697dd63b1d3ca65fa69e2bc4053161a408fa81bf (diff)
downloadkube-ce3a9e1cf5c6118e49a9842687df572294302cf9.tar.gz
kube-ce3a9e1cf5c6118e49a9842687df572294302cf9.zip
Update sync action to the new API
-rw-r--r--framework/domain/actions/sinkactions.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/framework/domain/actions/sinkactions.cpp b/framework/domain/actions/sinkactions.cpp
index cc8d324e..f996b91d 100644
--- a/framework/domain/actions/sinkactions.cpp
+++ b/framework/domain/actions/sinkactions.cpp
@@ -84,11 +84,13 @@ static ActionHandlerHelper synchronizeHandler("org.kde.kube.actions.synchronize"
84 }, 84 },
85 [](Context *context) { 85 [](Context *context) {
86 if (auto folder = context->property("folder").value<Folder::Ptr>()) { 86 if (auto folder = context->property("folder").value<Folder::Ptr>()) {
87 SinkLog() << "Synchronizing resource " << folder->resourceInstanceIdentifier(); 87 SinkLog() << "Synchronizing folder " << folder->resourceInstanceIdentifier() << folder->identifier();
88 Store::synchronize(Query().resourceFilter(folder->resourceInstanceIdentifier())).exec(); 88 auto scope = SyncScope().resourceFilter(folder->resourceInstanceIdentifier()).filter<Mail::Folder>(QVariant::fromValue(folder->identifier()));
89 scope.setType<ApplicationDomain::Mail>();
90 Store::synchronize(scope).exec();
89 } else { 91 } else {
90 SinkLog() << "Synchronizing all"; 92 SinkLog() << "Synchronizing all";
91 Store::synchronize(Query()).exec(); 93 Store::synchronize(SyncScope()).exec();
92 } 94 }
93 } 95 }
94); 96);