summaryrefslogtreecommitdiffstats
path: root/sinksh/syntax_modules/sink_sync.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sinksh/syntax_modules/sink_sync.cpp')
-rw-r--r--sinksh/syntax_modules/sink_sync.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/sinksh/syntax_modules/sink_sync.cpp b/sinksh/syntax_modules/sink_sync.cpp
index 2ed4cf7..e3c51ff 100644
--- a/sinksh/syntax_modules/sink_sync.cpp
+++ b/sinksh/syntax_modules/sink_sync.cpp
@@ -45,8 +45,12 @@ bool sync(const QStringList &args, State &state)
45 } 45 }
46 46
47 QTimer::singleShot(0, [query, state]() { 47 QTimer::singleShot(0, [query, state]() {
48 Sink::Store::synchronize(query).syncThen<void>([state]() { 48 Sink::Store::synchronize(query).syncThen<void>([state](const KAsync::Error &error) {
49 state.printLine("Synchronization complete!"); 49 if (error) {
50 state.printLine("Synchronization failed!");
51 } else {
52 state.printLine("Synchronization complete!");
53 }
50 state.commandFinished(); 54 state.commandFinished();
51 }).exec(); 55 }).exec();
52 }); 56 });