diff options
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r-- | common/synchronizer.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index b147615..fcdb5b8 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp | |||
@@ -252,15 +252,21 @@ void Synchronizer::modify(const DomainType &entity, const QByteArray &newResourc | |||
252 | 252 | ||
253 | QList<Synchronizer::SyncRequest> Synchronizer::getSyncRequests(const Sink::QueryBase &query) | 253 | QList<Synchronizer::SyncRequest> Synchronizer::getSyncRequests(const Sink::QueryBase &query) |
254 | { | 254 | { |
255 | QList<Synchronizer::SyncRequest> list; | 255 | return QList<Synchronizer::SyncRequest>() << Synchronizer::SyncRequest{query, "sync"}; |
256 | list << Synchronizer::SyncRequest{query, "sync"}; | 256 | } |
257 | return list; | 257 | |
258 | void Synchronizer::mergeIntoQueue(const Synchronizer::SyncRequest &request, QList<Synchronizer::SyncRequest> &queue) | ||
259 | { | ||
260 | mSyncRequestQueue << request; | ||
258 | } | 261 | } |
259 | 262 | ||
260 | void Synchronizer::synchronize(const Sink::QueryBase &query) | 263 | void Synchronizer::synchronize(const Sink::QueryBase &query) |
261 | { | 264 | { |
262 | SinkTraceCtx(mLogCtx) << "Synchronizing"; | 265 | SinkTraceCtx(mLogCtx) << "Synchronizing"; |
263 | mSyncRequestQueue << getSyncRequests(query); | 266 | auto newRequests = getSyncRequests(query); |
267 | for (const auto &request: newRequests) { | ||
268 | mergeIntoQueue(request, mSyncRequestQueue); | ||
269 | } | ||
264 | processSyncQueue().exec(); | 270 | processSyncQueue().exec(); |
265 | } | 271 | } |
266 | 272 | ||