From 3d8802e235e9508a0bf3d8a1168ad11c95571579 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 30 Aug 2016 00:48:59 +0200 Subject: Also call commandFinished in the error case. --- sinksh/syntax_modules/sink_sync.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sinksh/syntax_modules') 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) } QTimer::singleShot(0, [query, state]() { - Sink::Store::synchronize(query).syncThen([state]() { - state.printLine("Synchronization complete!"); + Sink::Store::synchronize(query).syncThen([state](const KAsync::Error &error) { + if (error) { + state.printLine("Synchronization failed!"); + } else { + state.printLine("Synchronization complete!"); + } state.commandFinished(); }).exec(); }); -- cgit v1.2.3