summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2015-12-23 20:23:10 +0100
committerAaron Seigo <aseigo@kde.org>2015-12-23 20:23:10 +0100
commit0a882e76dde2795f2f74ca28f775a74ac7177f54 (patch)
treefd7adb5534d7c15cc4a5b2b3c23ddfdc6c34c7d4
parent109fa78cd929b134e8fa826ec5c64b09dc88c3b7 (diff)
downloadsink-0a882e76dde2795f2f74ca28f775a74ac7177f54.tar.gz
sink-0a882e76dde2795f2f74ca28f775a74ac7177f54.zip
start the loop via State and only if the command succeeded in setting up
-rw-r--r--akonadi2_cli/syntaxtree.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/akonadi2_cli/syntaxtree.cpp b/akonadi2_cli/syntaxtree.cpp
index fe1acfb..e87b291 100644
--- a/akonadi2_cli/syntaxtree.cpp
+++ b/akonadi2_cli/syntaxtree.cpp
@@ -67,12 +67,12 @@ bool SyntaxTree::run(const QStringList &commands)
67{ 67{
68 Command command = match(commands); 68 Command command = match(commands);
69 if (command.first && command.first->lambda) { 69 if (command.first && command.first->lambda) {
70 command.first->lambda(command.second, m_state); 70 bool rv = command.first->lambda(command.second, m_state);
71 if (command.first->interactivity == Syntax::EventDriven) { 71 if (rv && command.first->interactivity == Syntax::EventDriven) {
72 return QCoreApplication::instance()->exec(); 72 return m_state.commandStarted();
73 } 73 }
74 74
75 return true; 75 return rv;
76 } 76 }
77 77
78 return false; 78 return false;