[Pkg-owncloud-commits] [owncloud-client] 57/83: Emit the sync finished signal a bit delayed.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat May 31 11:31:43 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 e275ad3866de98c1e302ef62ba5a2e5488493c04
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue May 27 11:33:08 2014 +0200
Emit the sync finished signal a bit delayed.
This allows folder watcher events comnig in before the sync is marked
finished. This avoids "endless syncing" as described in bug #1808
---
src/mirall/folder.cpp | 15 +++++++++++++++
src/mirall/folder.h | 2 ++
2 files changed, 17 insertions(+)
diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index 6ba5abf..bc0a0c4 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -655,9 +655,24 @@ void Folder::slotSyncFinished()
}
emit syncStateChange();
+
+ // The syncFinished result that is to be triggered here makes the folderman
+ // clearing the current running sync folder marker.
+ // Lets wait a bit to do that because, as long as this marker is not cleared,
+ // file system change notifications are ignored for that folder. And it takes
+ // some time under certain conditions to make the file system notifications
+ // all come in.
+ QTimer::singleShot(200, this, SLOT(slotEmitFinishedDelayed() ));
+
+}
+
+void Folder::slotEmitFinishedDelayed()
+{
emit syncFinished( _syncResult );
}
+
+
// the progress comes without a folder and the valid path set. Add that here
// and hand the result over to the progress dispatcher.
void Folder::slotTransmissionProgress(const Progress::Info &pi)
diff --git a/src/mirall/folder.h b/src/mirall/folder.h
index 85fea62..90f47a9 100644
--- a/src/mirall/folder.h
+++ b/src/mirall/folder.h
@@ -181,6 +181,8 @@ private slots:
void slotThreadTreeWalkResult(const SyncFileItemVector& );
+ void slotEmitFinishedDelayed();
+
private:
bool init();
--
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