diff options
-rw-r--r-- | common/synchronizer.cpp | 3 | ||||
-rw-r--r-- | common/synchronizer.h | 3 | ||||
-rw-r--r-- | examples/imapresource/imapresource.cpp | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index ed493dc..df36ef0 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp | |||
@@ -293,6 +293,7 @@ KAsync::Job<void> Synchronizer::processSyncQueue() | |||
293 | n.message = "Synchronization has started."; | 293 | n.message = "Synchronization has started."; |
294 | n.code = ApplicationDomain::BusyStatus; | 294 | n.code = ApplicationDomain::BusyStatus; |
295 | emit notify(n); | 295 | emit notify(n); |
296 | SinkLogCtx(mLogCtx) << "Synchronizing " << request.query.type(); | ||
296 | }).then(synchronizeWithSource(request.query)).syncThen<void>([this] { | 297 | }).then(synchronizeWithSource(request.query)).syncThen<void>([this] { |
297 | //Commit after every request, so implementations only have to commit more if they add a lot of data. | 298 | //Commit after every request, so implementations only have to commit more if they add a lot of data. |
298 | commit(); | 299 | commit(); |
@@ -367,7 +368,7 @@ void Synchronizer::commit() | |||
367 | Sink::Storage::DataStore::DataStore::Transaction &Synchronizer::syncTransaction() | 368 | Sink::Storage::DataStore::DataStore::Transaction &Synchronizer::syncTransaction() |
368 | { | 369 | { |
369 | if (!mSyncTransaction) { | 370 | if (!mSyncTransaction) { |
370 | SinkTrace() << "Starting transaction"; | 371 | SinkTrace() << "Starting transaction on sync store."; |
371 | mSyncTransaction = mSyncStorage.createTransaction(Sink::Storage::DataStore::DataStore::ReadWrite); | 372 | mSyncTransaction = mSyncStorage.createTransaction(Sink::Storage::DataStore::DataStore::ReadWrite); |
372 | } | 373 | } |
373 | return mSyncTransaction; | 374 | return mSyncTransaction; |
diff --git a/common/synchronizer.h b/common/synchronizer.h index 2c56d6a..a0a432c 100644 --- a/common/synchronizer.h +++ b/common/synchronizer.h | |||
@@ -166,11 +166,12 @@ protected: | |||
166 | */ | 166 | */ |
167 | virtual QList<Synchronizer::SyncRequest> getSyncRequests(const Sink::QueryBase &query); | 167 | virtual QList<Synchronizer::SyncRequest> getSyncRequests(const Sink::QueryBase &query); |
168 | 168 | ||
169 | protected: | ||
170 | Sink::Log::Context mLogCtx; | ||
169 | private: | 171 | private: |
170 | void modifyIfChanged(Storage::EntityStore &store, const QByteArray &bufferType, const QByteArray &sinkId, const Sink::ApplicationDomain::ApplicationDomainType &entity); | 172 | void modifyIfChanged(Storage::EntityStore &store, const QByteArray &bufferType, const QByteArray &sinkId, const Sink::ApplicationDomain::ApplicationDomainType &entity); |
171 | KAsync::Job<void> processSyncQueue(); | 173 | KAsync::Job<void> processSyncQueue(); |
172 | 174 | ||
173 | Sink::Log::Context mLogCtx; | ||
174 | Sink::ResourceContext mResourceContext; | 175 | Sink::ResourceContext mResourceContext; |
175 | Sink::Storage::EntityStore::Ptr mEntityStore; | 176 | Sink::Storage::EntityStore::Ptr mEntityStore; |
176 | QSharedPointer<SynchronizerStore> mSyncStore; | 177 | QSharedPointer<SynchronizerStore> mSyncStore; |
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 7d71136..f3f2c26 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp | |||
@@ -391,7 +391,7 @@ public: | |||
391 | } | 391 | } |
392 | return synchronizeFolder(imap, folder, dateFilter) | 392 | return synchronizeFolder(imap, folder, dateFilter) |
393 | .onError([folder](const KAsync::Error &error) { | 393 | .onError([folder](const KAsync::Error &error) { |
394 | SinkWarning() << "Failed to sync folder: ." << folder.normalizedPath(); | 394 | SinkWarning() << "Failed to sync folder: " << folder.path() << "Error: " << error.errorMessage; |
395 | }); | 395 | }); |
396 | }); | 396 | }); |
397 | 397 | ||