From 3170fccf0e33d1f8c4ca021cad0eb3c476c268a4 Mon Sep 17 00:00:00 2001 From: "S. Razi Alavizadeh" Date: Fri, 21 Jun 2013 03:27:58 +0430 Subject: [PATCH] [MasterPasswordDialog] Fixed, clear masterpassword always changes backend. -Also fixed recursive call to QDialog::exec() --- .../passwordbackends/databaseencryptedpasswordbackend.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/autofill/passwordbackends/databaseencryptedpasswordbackend.cpp b/src/lib/autofill/passwordbackends/databaseencryptedpasswordbackend.cpp index 8cd1559c0..6829c5ce9 100644 --- a/src/lib/autofill/passwordbackends/databaseencryptedpasswordbackend.cpp +++ b/src/lib/autofill/passwordbackends/databaseencryptedpasswordbackend.cpp @@ -340,6 +340,7 @@ void DatabaseEncryptedPasswordBackend::showMasterPasswordDialog() { MasterPasswordDialog* masterPasswordDialog = new MasterPasswordDialog(this, mApp->getWindow()); masterPasswordDialog->showSetMasterPasswordPage(); + masterPasswordDialog->delayedExec(); } void DatabaseEncryptedPasswordBackend::tryToChangeMasterPassword(const QByteArray &newPassword) @@ -580,10 +581,7 @@ void MasterPasswordDialog::showSettingPage() void MasterPasswordDialog::showSetMasterPasswordPage() { - disconnect(ui->setMasterPassword, SIGNAL(clicked()), this, SLOT(showSetMasterPasswordPage())); ui->stackedWidget->setCurrentIndex(1); - delayedExec(); - connect(ui->setMasterPassword, SIGNAL(clicked()), this, SLOT(showSetMasterPasswordPage())); } void MasterPasswordDialog::clearMasterPasswordAndConvert(bool forcedAskPass) @@ -628,6 +626,7 @@ void MasterPasswordDialog::clearMasterPasswordAndConvert(bool forcedAskPass) } else { QMessageBox::information(this, tr("Warning!"), tr("There are some data that were not decrypted. The master password was not cleared!")); + mApp->autoFill()->passwordManager()->switchBackend("database"); } } reject();