mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 11:39:25 +00:00
wizard: don't allow illegal chars in wallet name
This commit is contained in:
parent
5ba53a3702
commit
87ee96cb9a
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,10 @@ PageWalletFile::PageWalletFile(WizardFields *fields, QWidget *parent)
|
||||||
|
|
||||||
ui->frame_wallet->setInfo(icons()->icon("file"), "Choose a name and directory for your wallet files.");
|
ui->frame_wallet->setInfo(icons()->icon("file"), "Choose a name and directory for your wallet files.");
|
||||||
|
|
||||||
|
QRegularExpression nameRe(R"([^\/\\:*?"<>|]+)");
|
||||||
|
QValidator *nameValidator = new QRegularExpressionValidator(nameRe, this);
|
||||||
|
ui->line_walletName->setValidator(nameValidator);
|
||||||
|
|
||||||
connect(ui->btnChange, &QPushButton::clicked, [=] {
|
connect(ui->btnChange, &QPushButton::clicked, [=] {
|
||||||
QString currentWalletDir = conf()->get(Config::walletDirectory).toString();
|
QString currentWalletDir = conf()->get(Config::walletDirectory).toString();
|
||||||
QString walletDir = QFileDialog::getExistingDirectory(this, "Select wallet directory ", currentWalletDir, QFileDialog::ShowDirsOnly);
|
QString walletDir = QFileDialog::getExistingDirectory(this, "Select wallet directory ", currentWalletDir, QFileDialog::ShowDirsOnly);
|
||||||
|
|
Loading…
Reference in a new issue