diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/synchronizer.cpp | 6 | ||||
-rw-r--r-- | common/synchronizer.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index ec896ed..329841b 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp | |||
@@ -329,7 +329,7 @@ KAsync::Job<void> Synchronizer::processRequest(const SyncRequest &request) | |||
329 | return KAsync::start([this, request] { | 329 | return KAsync::start([this, request] { |
330 | SinkLogCtx(mLogCtx) << "Synchronizing: " << request.query; | 330 | SinkLogCtx(mLogCtx) << "Synchronizing: " << request.query; |
331 | emitNotification(Notification::Status, ApplicationDomain::BusyStatus, "Synchronization has started.", request.requestId); | 331 | emitNotification(Notification::Status, ApplicationDomain::BusyStatus, "Synchronization has started.", request.requestId); |
332 | emitNotification(Notification::Info, ApplicationDomain::SyncInProgress, {}, {}, request.query.ids()); | 332 | emitNotification(Notification::Info, ApplicationDomain::SyncInProgress, {}, {}, request.applicableEntities); |
333 | }).then(synchronizeWithSource(request.query)).then([this] { | 333 | }).then(synchronizeWithSource(request.query)).then([this] { |
334 | //Commit after every request, so implementations only have to commit more if they add a lot of data. | 334 | //Commit after every request, so implementations only have to commit more if they add a lot of data. |
335 | commit(); | 335 | commit(); |
@@ -337,12 +337,12 @@ KAsync::Job<void> Synchronizer::processRequest(const SyncRequest &request) | |||
337 | if (error) { | 337 | if (error) { |
338 | //Emit notification with error | 338 | //Emit notification with error |
339 | SinkWarningCtx(mLogCtx) << "Synchronization failed: " << error.errorMessage; | 339 | SinkWarningCtx(mLogCtx) << "Synchronization failed: " << error.errorMessage; |
340 | emitNotification(Notification::Warning, ApplicationDomain::SyncError, {}, {}, request.query.ids()); | 340 | emitNotification(Notification::Warning, ApplicationDomain::SyncError, {}, {}, request.applicableEntities); |
341 | emitNotification(Notification::Status, ApplicationDomain::ErrorStatus, "Synchronization has ended.", request.requestId); | 341 | emitNotification(Notification::Status, ApplicationDomain::ErrorStatus, "Synchronization has ended.", request.requestId); |
342 | return KAsync::error(error); | 342 | return KAsync::error(error); |
343 | } else { | 343 | } else { |
344 | SinkLogCtx(mLogCtx) << "Done Synchronizing"; | 344 | SinkLogCtx(mLogCtx) << "Done Synchronizing"; |
345 | emitNotification(Notification::Info, ApplicationDomain::SyncSuccess, {}, {}, request.query.ids()); | 345 | emitNotification(Notification::Info, ApplicationDomain::SyncSuccess, {}, {}, request.applicableEntities); |
346 | emitNotification(Notification::Status, ApplicationDomain::ConnectedStatus, "Synchronization has ended.", request.requestId); | 346 | emitNotification(Notification::Status, ApplicationDomain::ConnectedStatus, "Synchronization has ended.", request.requestId); |
347 | return KAsync::null(); | 347 | return KAsync::null(); |
348 | } | 348 | } |
diff --git a/common/synchronizer.h b/common/synchronizer.h index e3dbddc..751542d 100644 --- a/common/synchronizer.h +++ b/common/synchronizer.h | |||
@@ -134,7 +134,8 @@ protected: | |||
134 | : requestId(requestId_), | 134 | : requestId(requestId_), |
135 | requestType(Synchronization), | 135 | requestType(Synchronization), |
136 | options(o), | 136 | options(o), |
137 | query(q) | 137 | query(q), |
138 | applicableEntities(q.ids()) | ||
138 | { | 139 | { |
139 | } | 140 | } |
140 | 141 | ||
@@ -155,6 +156,7 @@ protected: | |||
155 | RequestType requestType; | 156 | RequestType requestType; |
156 | RequestOptions options = NoOptions; | 157 | RequestOptions options = NoOptions; |
157 | Sink::QueryBase query; | 158 | Sink::QueryBase query; |
159 | QByteArrayList applicableEntities; | ||
158 | }; | 160 | }; |
159 | 161 | ||
160 | /** | 162 | /** |