diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-13 14:52:27 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-16 14:54:14 +0100 |
commit | b1a2e2de201985a00980bead5272977cda4ef637 (patch) | |
tree | 9af03b622d8c5d6a3b3ed83efb846977813b58d8 /framework/actions/actionresult.h | |
parent | 3f4626d305aa43c2a720d692cdf8cf89cc658181 (diff) | |
download | kube-b1a2e2de201985a00980bead5272977cda4ef637.tar.gz kube-b1a2e2de201985a00980bead5272977cda4ef637.zip |
Preactionhandler
Diffstat (limited to 'framework/actions/actionresult.h')
-rw-r--r-- | framework/actions/actionresult.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/framework/actions/actionresult.h b/framework/actions/actionresult.h index e4d3efeb..dcf1a9ec 100644 --- a/framework/actions/actionresult.h +++ b/framework/actions/actionresult.h | |||
@@ -43,6 +43,18 @@ public: | |||
43 | } | 43 | } |
44 | virtual ~ActionResult() {} | 44 | virtual ~ActionResult() {} |
45 | 45 | ||
46 | ActionResult &operator+=(const ActionResult &rhs) | ||
47 | { | ||
48 | if (!error() && rhs.error()) { | ||
49 | setError(rhs.error()); | ||
50 | } | ||
51 | if (isDone() && rhs.isDone()) { | ||
52 | mData->mDone = false; | ||
53 | } | ||
54 | mData = rhs.mData; | ||
55 | return *this; | ||
56 | } | ||
57 | |||
46 | void setDone() { | 58 | void setDone() { |
47 | mData->mDone = true; | 59 | mData->mDone = true; |
48 | } | 60 | } |