Folder: Remove slotTerminateAndPauseSync

This make no sens to just set the pause config flag here. It make selective sync to mark
the folder as posed on restart
This commit is contained in:
Olivier Goffart 2014-09-26 12:43:54 +02:00
parent fe1653ede6
commit 10989d13e4
4 changed files with 3 additions and 10 deletions

View file

@ -383,7 +383,7 @@ void AccountSettings::slotResetCurrentFolder()
if( ret == QMessageBox::Yes ) { if( ret == QMessageBox::Yes ) {
FolderMan *folderMan = FolderMan::instance(); FolderMan *folderMan = FolderMan::instance();
Folder *f = folderMan->folder(alias); Folder *f = folderMan->folder(alias);
f->slotTerminateAndPauseSync(); f->slotTerminateSync();
f->wipe(); f->wipe();
folderMan->slotScheduleAllFolders(); folderMan->slotScheduleAllFolders();
} }
@ -499,7 +499,7 @@ void AccountSettings::slotEnableCurrentFolder()
// message box can return at any time while the thread keeps running, // message box can return at any time while the thread keeps running,
// so better check again after the user has responded. // so better check again after the user has responded.
if ( f->isBusy() && terminate ) { if ( f->isBusy() && terminate ) {
f->slotTerminateAndPauseSync(); f->slotTerminateSync();
} }
f->setSyncPaused(!currentlyPaused); // toggle the pause setting f->setSyncPaused(!currentlyPaused); // toggle the pause setting
folderMan->slotSetFolderPaused( alias, !currentlyPaused ); folderMan->slotSetFolderPaused( alias, !currentlyPaused );

View file

@ -515,12 +515,6 @@ void Folder::slotTerminateSync()
} }
} }
void Folder::slotTerminateAndPauseSync()
{
slotTerminateSync();
FolderMan::instance()->slotSetFolderPaused(alias(), true);
}
// This removes the csync File database // This removes the csync File database
// This is needed to provide a clean startup again in case another // This is needed to provide a clean startup again in case another
// local folder is synced to the same ownCloud. // local folder is synced to the same ownCloud.

View file

@ -138,7 +138,6 @@ public slots:
* terminate the current sync run * terminate the current sync run
*/ */
void slotTerminateSync(); void slotTerminateSync();
void slotTerminateAndPauseSync();
void slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool*); void slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool*);

View file

@ -284,7 +284,7 @@ void SelectiveSyncDialog::accept()
FolderMan *folderMan = FolderMan::instance(); FolderMan *folderMan = FolderMan::instance();
if (_folder->isBusy()) { if (_folder->isBusy()) {
_folder->slotTerminateAndPauseSync(); _folder->slotTerminateSync();
} }
folderMan->slotScheduleSync(_folder->alias()); folderMan->slotScheduleSync(_folder->alias());
} }