mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Added default argument to terminateSyncProcess
This commit is contained in:
parent
96531b548a
commit
0eb6740bac
2 changed files with 12 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue