diff options
Diffstat (limited to 'framework/actions/actionbroker.cpp')
-rw-r--r-- | framework/actions/actionbroker.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/framework/actions/actionbroker.cpp b/framework/actions/actionbroker.cpp index 43a535a1..890a5566 100644 --- a/framework/actions/actionbroker.cpp +++ b/framework/actions/actionbroker.cpp | |||
@@ -54,17 +54,22 @@ bool ActionBroker::isActionReady(const QByteArray &actionId, Context *context) | |||
54 | return false; | 54 | return false; |
55 | } | 55 | } |
56 | 56 | ||
57 | void ActionBroker::executeAction(const QByteArray &actionId, Context *context) | 57 | ActionResult ActionBroker::executeAction(const QByteArray &actionId, Context *context) |
58 | { | 58 | { |
59 | if (context) { | 59 | if (context) { |
60 | for (const auto handler : mHandler.values(actionId)) { | 60 | for (const auto handler : mHandler.values(actionId)) { |
61 | if (handler) { | 61 | if (handler) { |
62 | handler->execute(context); | 62 | //FIXME All handler together return one result |
63 | return handler->execute(context); | ||
63 | } | 64 | } |
64 | } | 65 | } |
65 | } else { | 66 | } else { |
66 | qWarning() << "Can't execute without context"; | 67 | qWarning() << "Can't execute without context"; |
67 | } | 68 | } |
69 | ActionResult result; | ||
70 | result.setDone(); | ||
71 | result.setError(1); | ||
72 | return result; | ||
68 | } | 73 | } |
69 | 74 | ||
70 | void ActionBroker::registerHandler(const QByteArray &actionId, ActionHandler *handler) | 75 | void ActionBroker::registerHandler(const QByteArray &actionId, ActionHandler *handler) |