Added default argument to terminateSyncProcess

This commit is contained in:
Klaas Freitag 2013-06-03 15:46:11 +02:00
parent 96531b548a
commit 0eb6740bac
2 changed files with 12 additions and 6 deletions

View file

@ -275,12 +275,18 @@ void FolderMan::slotEnableFolder( const QString& alias, bool enable )
// csync still remains in a stable state, regardless of that.
void FolderMan::terminateSyncProcess( const QString& alias )
{
Folder *f = _folderMap[alias];
if( f ) {
f->slotTerminateSync();
QString folderAlias = alias;
if( alias.isEmpty() ) {
folderAlias = _currentSyncFolder;
}
if( ! folderAlias.isEmpty() ) {
Folder *f = _folderMap[folderAlias];
if( f ) {
f->slotTerminateSync();
if(_currentSyncFolder == alias )
_currentSyncFolder = QString::null;
if(_currentSyncFolder == folderAlias )
_currentSyncFolder = QString::null;
}
}
}

View file

@ -102,7 +102,7 @@ public slots:
void slotReparseConfiguration();
void terminateSyncProcess( const QString& );
void terminateSyncProcess( const QString& alias = QString::null );
// if enabled is set to false, no new folders will start to sync.
// the current one will finish.