From 447383e860d523ca3aab7da266622780f644de6c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 4 May 2017 16:38:12 +0200 Subject: Avoid unnecessary noise Such as progress 0 out of 0 (happens on sync of already synced folder) --- common/synchronizer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/synchronizer.cpp') diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index 58e5e7a..175ed83 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp @@ -317,8 +317,10 @@ void Synchronizer::emitProgressNotification(Notification::NoticationType type, i void Synchronizer::reportProgress(int progress, int total) { - SinkLogCtx(mLogCtx) << "Progress: " << progress << " out of " << total; - emitProgressNotification(Notification::Progress, progress, total, mCurrentRequest.requestId, mCurrentRequest.applicableEntities); + if (progress > 0 && total > 0) { + SinkLogCtx(mLogCtx) << "Progress: " << progress << " out of " << total; + emitProgressNotification(Notification::Progress, progress, total, mCurrentRequest.requestId, mCurrentRequest.applicableEntities); + } } void Synchronizer::setStatusFromResult(const KAsync::Error &error, const QString &s, const QByteArray &requestId) -- cgit v1.2.3