diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-13 16:24:31 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-16 14:54:14 +0100 |
commit | 630f45719a527f8ee739b03bc62f886badea6df3 (patch) | |
tree | b9d859cbfedb30ad8a9570e3b87a419bf24ba6c7 /framework/actions/actionbroker.h | |
parent | b1a2e2de201985a00980bead5272977cda4ef637 (diff) | |
download | kube-630f45719a527f8ee739b03bc62f886badea6df3.tar.gz kube-630f45719a527f8ee739b03bc62f886badea6df3.zip |
Revamp of composercontroller to use actions more.
Instead of setting all properties individually we directly assign all
properties to a context that we assign to the actions.
This way actions can automatically update themselves as new data becomes
available, and we avoid the setter/getter boilerplate, at the cost of a
less explicit interface (But that could be improved by allowing to
define the required properties of a context in c++).
By relying on prehandler/posthandler to execute certain actions we
simplify the control flow and enable the future extension with handlers
that i.e. do encryption etc.
Diffstat (limited to 'framework/actions/actionbroker.h')
-rw-r--r-- | framework/actions/actionbroker.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/actions/actionbroker.h b/framework/actions/actionbroker.h index d2787c79..84678c16 100644 --- a/framework/actions/actionbroker.h +++ b/framework/actions/actionbroker.h | |||
@@ -32,7 +32,7 @@ class ActionBroker : public QObject | |||
32 | public: | 32 | public: |
33 | static ActionBroker &instance(); | 33 | static ActionBroker &instance(); |
34 | 34 | ||
35 | bool isActionReady(const QByteArray &actionId, Context *context); | 35 | bool isActionReady(const QByteArray &actionId, Context *context, const QList<QPointer<ActionHandler>> &preHandler); |
36 | ActionResult executeAction(const QByteArray &actionId, Context *context, const QList<QPointer<ActionHandler>> &preHandler, const QList<QPointer<ActionHandler>> &postHandler); | 36 | ActionResult executeAction(const QByteArray &actionId, Context *context, const QList<QPointer<ActionHandler>> &preHandler, const QList<QPointer<ActionHandler>> &postHandler); |
37 | 37 | ||
38 | void registerHandler(const QByteArray &actionId, ActionHandler *handler); | 38 | void registerHandler(const QByteArray &actionId, ActionHandler *handler); |