AccountSettings: Remove the F5 reset folder shortcut

This secret key was used to wipe the database. In the past this was
usefull because of many bugs, but now this is not usefull anymore.
And cause trouble because it also erase the selective sync list.

Issue #4182
This commit is contained in:
Olivier Goffart 2015-12-02 12:24:33 +01:00
parent 895f0b29aa
commit e27374324d
2 changed files with 0 additions and 31 deletions

View file

@ -99,11 +99,6 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
connect(_model, SIGNAL(rowsInserted(QModelIndex,int,int)), connect(_model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(refreshSelectiveSyncStatus())); this, SLOT(refreshSelectiveSyncStatus()));
QAction *resetFolderAction = new QAction(this);
resetFolderAction->setShortcut(QKeySequence(Qt::Key_F5));
connect(resetFolderAction, SIGNAL(triggered()), SLOT(slotResetCurrentFolder()));
addAction(resetFolderAction);
QAction *syncNowAction = new QAction(this); QAction *syncNowAction = new QAction(this);
syncNowAction->setShortcut(QKeySequence(Qt::Key_F6)); syncNowAction->setShortcut(QKeySequence(Qt::Key_F6));
connect(syncNowAction, SIGNAL(triggered()), SLOT(slotSyncCurrentFolderNow())); connect(syncNowAction, SIGNAL(triggered()), SLOT(slotSyncCurrentFolderNow()));
@ -340,31 +335,6 @@ void AccountSettings::slotRemoveCurrentFolder()
} }
} }
void AccountSettings::slotResetCurrentFolder()
{
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();
if( selected.isValid() ) {
QString alias = _model->data( selected, FolderStatusDelegate::FolderAliasRole ).toString();
if (alias.isEmpty())
return;
int ret = QMessageBox::question( 0, tr("Confirm Folder Reset"),
tr("<p>Do you really want to reset folder <i>%1</i> and rebuild your client database?</p>"
"<p><b>Note:</b> This function is designed for maintenance purposes only. "
"No files will be removed, but this can cause significant data traffic and "
"take several minutes or hours to complete, depending on the size of the folder. "
"Only use this option if advised by your administrator.</p>").arg(alias),
QMessageBox::Yes|QMessageBox::No );
if( ret == QMessageBox::Yes ) {
FolderMan *folderMan = FolderMan::instance();
if(Folder *f = folderMan->folder(alias)) {
f->slotTerminateSync();
f->wipe();
}
folderMan->slotScheduleAllFolders();
}
}
}
void AccountSettings::slotOpenCurrentFolder() void AccountSettings::slotOpenCurrentFolder()
{ {
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex(); QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();

View file

@ -72,7 +72,6 @@ protected slots:
void slotEnableCurrentFolder(); void slotEnableCurrentFolder();
void slotSyncCurrentFolderNow(); void slotSyncCurrentFolderNow();
void slotRemoveCurrentFolder(); void slotRemoveCurrentFolder();
void slotResetCurrentFolder();
void slotOpenCurrentFolder(); void slotOpenCurrentFolder();
void slotFolderWizardAccepted(); void slotFolderWizardAccepted();
void slotFolderWizardRejected(); void slotFolderWizardRejected();