summaryrefslogtreecommitdiffstats
path: root/common/resourcecontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/resourcecontrol.cpp')
-rw-r--r--common/resourcecontrol.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/resourcecontrol.cpp b/common/resourcecontrol.cpp
index b6a4c0b..a69b7fa 100644
--- a/common/resourcecontrol.cpp
+++ b/common/resourcecontrol.cpp
@@ -101,10 +101,13 @@ KAsync::Job<void> ResourceControl::flush(Flush::FlushType type, const QByteArray
101 SinkTrace() << "Waiting for flush completion notification " << id; 101 SinkTrace() << "Waiting for flush completion notification " << id;
102 notifier->registerHandler([&future, id](const Notification &notification) { 102 notifier->registerHandler([&future, id](const Notification &notification) {
103 SinkTrace() << "Received notification: " << notification.type << notification.id; 103 SinkTrace() << "Received notification: " << notification.type << notification.id;
104 if (notification.id == id) { 104 if (notification.type == Notification::Error && notification.code == ApplicationDomain::ResourceCrashedError) {
105 SinkWarning() << "Error during flush";
106 future.setError(-1, "Error during flush: " + notification.message);
107 } else if (notification.id == id) {
105 SinkTrace() << "FlushComplete"; 108 SinkTrace() << "FlushComplete";
106 if (notification.code) { 109 if (notification.code) {
107 SinkWarning() << "Flush return an error"; 110 SinkWarning() << "Flush returned an error";
108 future.setError(-1, "Flush returned an error: " + notification.message); 111 future.setError(-1, "Flush returned an error: " + notification.message);
109 } else { 112 } else {
110 future.setFinished(); 113 future.setFinished();