Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKlaas Freitag <freitag@owncloud.com>2013-09-11 14:30:29 +0400
committerKlaas Freitag <freitag@owncloud.com>2013-09-11 14:30:29 +0400
commit80332fb6abaf9f3d513c4ed580f5cd8c4e56e7d9 (patch)
tree944d5317d7d493eab0d37b46069760dbc687b9e1 /src
parent287ec2f3df103af21665d550c473d03992f87354 (diff)
Do not en- or disable the watcher in setSyncEnabled.
The watcher is handled through the start and stop sync hooks in the folder class. Even if the the folder is disabled and the watcher fires, the folder does not schedule because it checks first if the folder is enabled.
Diffstat (limited to 'src')
-rw-r--r--src/mirall/folder.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index 97055c7a0..b54e9480e 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -196,15 +196,14 @@ bool Folder::syncEnabled() const
void Folder::setSyncEnabled( bool doit )
{
_enabled = doit;
- _watcher->setEventsEnabled( doit );
qDebug() << "setSyncEnabled - ############################ " << doit;
if( doit ) {
- // undefined until next sync
- _syncResult.setStatus( SyncResult::NotYetStarted);
- _syncResult.clearErrors();
evaluateSync( QStringList() );
} else {
+ // do not stop or start the watcher here, that is done internally by
+ // folder class. Even if the watcher fires, the folder does not
+ // schedule itself because it checks the var. _enabled before.
_pollTimer.stop();
}
}
@@ -227,6 +226,7 @@ void Folder::evaluateSync(const QStringList &/*pathList*/)
}
_syncResult.setStatus( SyncResult::NotYetStarted );
+ _syncResult.clearErrors();
emit scheduleToSync( alias() );
}