summaryrefslogtreecommitdiffstats
path: root/common/synchronizer.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-04 16:38:12 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-04 16:38:12 +0200
commit447383e860d523ca3aab7da266622780f644de6c (patch)
tree6eb1593b4dc7e33e86966df7ae7d0f3a6c7535d8 /common/synchronizer.cpp
parentbb3a79c8b71d6d4e2a4269bdcffb616b2db9d619 (diff)
downloadsink-447383e860d523ca3aab7da266622780f644de6c.tar.gz
sink-447383e860d523ca3aab7da266622780f644de6c.zip
Avoid unnecessary noise
Such as progress 0 out of 0 (happens on sync of already synced folder)
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r--common/synchronizer.cpp6
1 files changed, 4 insertions, 2 deletions
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
317 317
318void Synchronizer::reportProgress(int progress, int total) 318void Synchronizer::reportProgress(int progress, int total)
319{ 319{
320 SinkLogCtx(mLogCtx) << "Progress: " << progress << " out of " << total; 320 if (progress > 0 && total > 0) {
321 emitProgressNotification(Notification::Progress, progress, total, mCurrentRequest.requestId, mCurrentRequest.applicableEntities); 321 SinkLogCtx(mLogCtx) << "Progress: " << progress << " out of " << total;
322 emitProgressNotification(Notification::Progress, progress, total, mCurrentRequest.requestId, mCurrentRequest.applicableEntities);
323 }
322} 324}
323 325
324void Synchronizer::setStatusFromResult(const KAsync::Error &error, const QString &s, const QByteArray &requestId) 326void Synchronizer::setStatusFromResult(const KAsync::Error &error, const QString &s, const QByteArray &requestId)