1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

[MasterPasswordDialog] Fixed, clear masterpassword always changes backend.

-Also fixed recursive call to QDialog::exec()
This commit is contained in:
S. Razi Alavizadeh 2013-06-21 03:27:58 +04:30
parent 5ea3572368
commit 3170fccf0e

View File

@ -340,6 +340,7 @@ void DatabaseEncryptedPasswordBackend::showMasterPasswordDialog()
{ {
MasterPasswordDialog* masterPasswordDialog = new MasterPasswordDialog(this, mApp->getWindow()); MasterPasswordDialog* masterPasswordDialog = new MasterPasswordDialog(this, mApp->getWindow());
masterPasswordDialog->showSetMasterPasswordPage(); masterPasswordDialog->showSetMasterPasswordPage();
masterPasswordDialog->delayedExec();
} }
void DatabaseEncryptedPasswordBackend::tryToChangeMasterPassword(const QByteArray &newPassword) void DatabaseEncryptedPasswordBackend::tryToChangeMasterPassword(const QByteArray &newPassword)
@ -580,10 +581,7 @@ void MasterPasswordDialog::showSettingPage()
void MasterPasswordDialog::showSetMasterPasswordPage() void MasterPasswordDialog::showSetMasterPasswordPage()
{ {
disconnect(ui->setMasterPassword, SIGNAL(clicked()), this, SLOT(showSetMasterPasswordPage()));
ui->stackedWidget->setCurrentIndex(1); ui->stackedWidget->setCurrentIndex(1);
delayedExec();
connect(ui->setMasterPassword, SIGNAL(clicked()), this, SLOT(showSetMasterPasswordPage()));
} }
void MasterPasswordDialog::clearMasterPasswordAndConvert(bool forcedAskPass) void MasterPasswordDialog::clearMasterPasswordAndConvert(bool forcedAskPass)
@ -628,6 +626,7 @@ void MasterPasswordDialog::clearMasterPasswordAndConvert(bool forcedAskPass)
} }
else { else {
QMessageBox::information(this, tr("Warning!"), tr("There are some data that were not decrypted. The master password was not cleared!")); 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(); reject();