[Pkg-owncloud-commits] [owncloud-client] 151/219: progress: Set a clear start indication in the progress.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 2c67a7ca717416aeb5b6d838d4a86bdaec98f0f4
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Tue Sep 23 15:58:06 2014 +0200

    progress: Set a clear start indication in the progress.
    
    Before, 0 was used to indicate the sync start which wipes the activity
    window. However, if there _are_ no synced items but only ignored items
    the overall counter stays zero which wipes the list all the time.
    
    This fixes bug #2171
---
 src/mirall/protocolwidget.cpp | 2 +-
 src/mirall/syncengine.cpp     | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mirall/protocolwidget.cpp b/src/mirall/protocolwidget.cpp
index 744532a..00d3636 100644
--- a/src/mirall/protocolwidget.cpp
+++ b/src/mirall/protocolwidget.cpp
@@ -247,7 +247,7 @@ void ProtocolWidget::computeResyncButtonEnabled()
 
 void ProtocolWidget::slotProgressInfo( const QString& folder, const Progress::Info& progress )
 {
-    if( progress._completedFileCount == 0 ) {
+    if( progress._completedFileCount == -1 ) {
         // The sync is restarting, clean the old items
         cleanIgnoreItems(folder);
         computeResyncButtonEnabled();
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index ac4c4bf..081ef88 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -656,7 +656,9 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
 
     // To announce the beginning of the sync
     emit aboutToPropagate(_syncedItems);
+    _progressInfo._completedFileCount = -1; // indicate the start.
     emit transmissionProgress(_progressInfo);
+    _progressInfo._completedFileCount = 0;
 
     if (!_hasNoneFiles && _hasRemoveFile) {
         qDebug() << Q_FUNC_INFO << "All the files are going to be changed, asking the user";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list