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
This commit is contained in:
Klaas Freitag 2014-05-27 11:33:08 +02:00
parent 5813f63df8
commit e275ad3866
2 changed files with 17 additions and 0 deletions

View file

@ -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)

View file

@ -181,6 +181,8 @@ private slots:
void slotThreadTreeWalkResult(const SyncFileItemVector& );
void slotEmitFinishedDelayed();
private:
bool init();