PasswordDialog: Show wallet name

This commit is contained in:
mrdeveloper
2020-10-21 08:45:25 +02:00
parent 49f072eea4
commit d6c26d4159
6 changed files with 8 additions and 7 deletions
+3 -2
View File
@@ -545,12 +545,13 @@ void MainWindow::onWalletCreatedError(const QString &err) {
this->showWizard(WalletWizard::Page_CreateWallet);
}
void MainWindow::onWalletOpenPasswordRequired(bool invalidPassword) {
void MainWindow::onWalletOpenPasswordRequired(bool invalidPassword, const QString &path) {
QFileInfo fileInfo(path);
QInputDialog passwordDialog(this);
passwordDialog.setInputMode(QInputDialog::TextInput);
passwordDialog.setTextEchoMode(QLineEdit::Password);
passwordDialog.setWindowTitle("Password required");
passwordDialog.setLabelText("Please enter wallet password.");
passwordDialog.setLabelText(QString("Please enter %1 wallet password.").arg(fileInfo.fileName()));
passwordDialog.resize(300, 100);
if(!(bool)passwordDialog.exec())
return this->showWizard(WalletWizard::Page_OpenWallet);