[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [akonadi-next/feature/new_cli] akonadi2_cli: start the loop via State and only if the command succee
From:       Aaron Seigo <aseigo () kde ! org>
Date:       2015-12-23 19:28:37
Message-ID: E1aBp5R-0002QW-Gc () scm ! kde ! org
[Download RAW message or body]

Git commit 0a882e76dde2795f2f74ca28f775a74ac7177f54 by Aaron Seigo.
Committed on 23/12/2015 at 19:23.
Pushed by aseigo into branch 'feature/new_cli'.

start the loop via State and only if the command succeeded in setting up

M  +4    -4    akonadi2_cli/syntaxtree.cpp

http://commits.kde.org/akonadi-next/0a882e76dde2795f2f74ca28f775a74ac7177f54

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)
 {
     Command command = match(commands);
     if (command.first && command.first->lambda) {
-        command.first->lambda(command.second, m_state);
-        if (command.first->interactivity == Syntax::EventDriven) {
-            return QCoreApplication::instance()->exec();
+        bool rv = command.first->lambda(command.second, m_state);
+        if (rv && command.first->interactivity == Syntax::EventDriven) {
+            return m_state.commandStarted();
         }
 
-        return true;
+        return rv;
     }
 
     return false;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic