[Pkg-owncloud-commits] [owncloud-client] 06/470: AccountSettings: Remove the F5 reset folder shortcut

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:24:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit e27374324daccab939e4f55ec1b9b46c459b8b48
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Dec 2 12:24:33 2015 +0100

    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
---
 src/gui/accountsettings.cpp | 30 ------------------------------
 src/gui/accountsettings.h   |  1 -
 2 files changed, 31 deletions(-)

diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index ff7953f..4324b27 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -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();
diff --git a/src/gui/accountsettings.h b/src/gui/accountsettings.h
index f7a4169..38c2e27 100644
--- a/src/gui/accountsettings.h
+++ b/src/gui/accountsettings.h
@@ -72,7 +72,6 @@ protected slots:
     void slotEnableCurrentFolder();
     void slotSyncCurrentFolderNow();
     void slotRemoveCurrentFolder();
-    void slotResetCurrentFolder();
     void slotOpenCurrentFolder();
     void slotFolderWizardAccepted();
     void slotFolderWizardRejected();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list