diff options
author | Sandro Knauß <sknauss@kde.org> | 2016-10-10 13:01:15 +0200 |
---|---|---|
committer | Sandro Knauß <sknauss@kde.org> | 2016-10-10 13:01:15 +0200 |
commit | 6b6f20ffbe06402abcc7d4721ad1f647c3fc4c46 (patch) | |
tree | 6e2762d879c64373519b0506e9a66ddc27f04830 /framework/actions/actionhandler.cpp | |
parent | 349e404b539c1f9d1feb54658e2e6fbbd2165462 (diff) | |
parent | 5fa8608e9877eab40336a60ed8ed979aaf3cfbd0 (diff) | |
download | kube-6b6f20ffbe06402abcc7d4721ad1f647c3fc4c46.tar.gz kube-6b6f20ffbe06402abcc7d4721ad1f647c3fc4c46.zip |
Merge branch 'develop' into dev/mimetreeinterface
Diffstat (limited to 'framework/actions/actionhandler.cpp')
-rw-r--r-- | framework/actions/actionhandler.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/framework/actions/actionhandler.cpp b/framework/actions/actionhandler.cpp index 4ae8d0a9..9d58f464 100644 --- a/framework/actions/actionhandler.cpp +++ b/framework/actions/actionhandler.cpp | |||
@@ -106,14 +106,12 @@ ActionResult ActionHandlerHelper::execute(Context *context) | |||
106 | handlerFunction(context); | 106 | handlerFunction(context); |
107 | result.setDone(); | 107 | result.setDone(); |
108 | } else { | 108 | } else { |
109 | jobHandlerFunction(context).then<void>([=]() { | 109 | jobHandlerFunction(context).syncThen<void>([=](const KAsync::Error &error) { |
110 | auto modifyableResult = result; | 110 | auto modifyableResult = result; |
111 | modifyableResult.setDone(); | 111 | if (error) { |
112 | }, | 112 | qWarning() << "Job failed: " << error.errorCode << error.errorMessage; |
113 | [=](int errorCode, const QString &string) { | 113 | modifyableResult.setError(1); |
114 | qWarning() << "Job failed: " << errorCode << string; | 114 | } |
115 | auto modifyableResult = result; | ||
116 | modifyableResult.setError(1); | ||
117 | modifyableResult.setDone(); | 115 | modifyableResult.setDone(); |
118 | }).exec(); | 116 | }).exec(); |
119 | } | 117 | } |