From 4983c40b580a2421c9be43760e6a8bebdb156ef3 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 18 Jan 2017 16:02:40 +0100 Subject: Debug output --- common/synchronizer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/synchronizer.cpp') diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index d86b027..d94083b 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp @@ -277,6 +277,7 @@ void Synchronizer::flush(int commandId, const QByteArray &flushId) KAsync::Job Synchronizer::processSyncQueue() { if (mSyncRequestQueue.isEmpty() || mSyncInProgress) { + SinkTrace() << "Sync still in progress or nothing to do."; return KAsync::null(); } @@ -285,7 +286,7 @@ KAsync::Job Synchronizer::processSyncQueue() mSyncInProgress = true; }); while (!mSyncRequestQueue.isEmpty()) { - auto request = mSyncRequestQueue.takeFirst(); + const auto request = mSyncRequestQueue.takeFirst(); if (request.requestType == Synchronizer::SyncRequest::Synchronization) { job = job.then([this, request] { Sink::Notification n; @@ -343,6 +344,7 @@ KAsync::Job Synchronizer::processSyncQueue() } } return job.then([this](const KAsync::Error &error) { + SinkTrace() << "Sync request processed"; mSyncTransaction.abort(); mMessageQueue->commit(); mSyncStore.clear(); @@ -446,6 +448,8 @@ KAsync::Job Synchronizer::replay(const QByteArray &type, const QByteArray } else if (type == ApplicationDomain::getTypeName()) { auto mail = store().readEntity(key); job = replay(mail, operation, oldRemoteId, modifiedProperties); + } else { + SinkError() << "Replayed unknown type: " << type; } return job.then([this, operation, type, uid, oldRemoteId](const QByteArray &remoteId) { -- cgit v1.2.3