diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-04 16:38:12 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-04 16:38:12 +0200 |
commit | 447383e860d523ca3aab7da266622780f644de6c (patch) | |
tree | 6eb1593b4dc7e33e86966df7ae7d0f3a6c7535d8 /common | |
parent | bb3a79c8b71d6d4e2a4269bdcffb616b2db9d619 (diff) | |
download | sink-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')
-rw-r--r-- | common/synchronizer.cpp | 6 |
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 | ||
318 | void Synchronizer::reportProgress(int progress, int total) | 318 | void 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 | ||
324 | void Synchronizer::setStatusFromResult(const KAsync::Error &error, const QString &s, const QByteArray &requestId) | 326 | void Synchronizer::setStatusFromResult(const KAsync::Error &error, const QString &s, const QByteArray &requestId) |