Merge pull request #1734 from Integral-Tech/confirm-passwd

Add dialog for repeating password when exporting keys
pull/1761/head
DeepBlueV7.X 5 months ago committed by GitHub
commit 9eac31627a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      src/UserSettingsPage.cpp

@ -2133,6 +2133,20 @@ UserSettingsModel::exportSessionKeys()
return;
}
auto repeatedPassword = QInputDialog::getText(nullptr,
tr("Repeat File Password"),
tr("Repeat the passphrase:"),
QLineEdit::Password,
QLatin1String(""),
&ok);
if (!ok)
return;
if (password != repeatedPassword) {
QMessageBox::warning(nullptr, tr("Error"), tr("Passwords don't match"));
return;
}
// Open file dialog to save the file.
const QString homeFolder = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
const QString fileName = QFileDialog::getSaveFileName(

Loading…
Cancel
Save