mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 13:25:52 +03:00
Remove unused slotDeleteAccount in AccountSettings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
7084310a9f
commit
893adb8280
2 changed files with 0 additions and 28 deletions
|
@ -1521,33 +1521,6 @@ void AccountSettings::refreshSelectiveSyncStatus()
|
|||
}
|
||||
}
|
||||
|
||||
void AccountSettings::slotDeleteAccount()
|
||||
{
|
||||
// Deleting the account potentially deletes 'this', so
|
||||
// the QMessageBox should be destroyed before that happens.
|
||||
const auto messageBox = new QMessageBox(QMessageBox::Question,
|
||||
tr("Confirm Account Removal"),
|
||||
tr("<p>Do you really want to remove the connection to the account <i>%1</i>?</p>"
|
||||
"<p><b>Note:</b> This will <b>not</b> delete any files.</p>")
|
||||
.arg(_accountState->account()->displayName()),
|
||||
QMessageBox::NoButton,
|
||||
this);
|
||||
const auto yesButton = messageBox->addButton(tr("Remove connection"), QMessageBox::YesRole);
|
||||
messageBox->addButton(tr("Cancel"), QMessageBox::NoRole);
|
||||
messageBox->setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(messageBox, &QMessageBox::finished, this, [this, messageBox, yesButton]{
|
||||
if (messageBox->clickedButton() == yesButton) {
|
||||
// Else it might access during destruction. This should be better handled by it having a QSharedPointer
|
||||
_model->setAccountState(nullptr);
|
||||
|
||||
const auto manager = AccountManager::instance();
|
||||
manager->deleteAccount(_accountState);
|
||||
manager->save();
|
||||
}
|
||||
});
|
||||
messageBox->open();
|
||||
}
|
||||
|
||||
bool AccountSettings::event(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::Hide || e->type() == QEvent::Show) {
|
||||
|
|
|
@ -93,7 +93,6 @@ protected slots:
|
|||
void slotSetSubFolderAvailability(OCC::Folder *folder, const QString &path, OCC::PinState state);
|
||||
void slotFolderWizardAccepted();
|
||||
void slotFolderWizardRejected();
|
||||
void slotDeleteAccount();
|
||||
void slotToggleSignInState();
|
||||
void refreshSelectiveSyncStatus();
|
||||
void slotMarkSubfolderEncrypted(OCC::FolderStatusModel::SubFolderInfo *folderInfo);
|
||||
|
|
Loading…
Reference in a new issue