summaryrefslogtreecommitdiffstats
path: root/sinksh/syntax_modules
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-08-30 00:48:59 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-09-15 16:14:19 +0200
commit3d8802e235e9508a0bf3d8a1168ad11c95571579 (patch)
tree6472bbd934dea6081b5a5ab1464989d4f8cec8df /sinksh/syntax_modules
parent6b09016f5d9119729265211db6cc91f991fc3e28 (diff)
downloadsink-3d8802e235e9508a0bf3d8a1168ad11c95571579.tar.gz
sink-3d8802e235e9508a0bf3d8a1168ad11c95571579.zip
Also call commandFinished in the error case.
Diffstat (limited to 'sinksh/syntax_modules')
-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 });