mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-17 19:31:48 +03:00
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:
parent
895f0b29aa
commit
e27374324d
2 changed files with 0 additions and 31 deletions
|
@ -99,11 +99,6 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
|
|||
connect(_model, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
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);
|
||||
syncNowAction->setShortcut(QKeySequence(Qt::Key_F6));
|
||||
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()
|
||||
{
|
||||
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();
|
||||
|
|
|
@ -72,7 +72,6 @@ protected slots:
|
|||
void slotEnableCurrentFolder();
|
||||
void slotSyncCurrentFolderNow();
|
||||
void slotRemoveCurrentFolder();
|
||||
void slotResetCurrentFolder();
|
||||
void slotOpenCurrentFolder();
|
||||
void slotFolderWizardAccepted();
|
||||
void slotFolderWizardRejected();
|
||||
|
|
Loading…
Reference in a new issue