Skip to content

Commit 43aa9b0

Browse files
committed
gui: rename encrypt(), blank(), and askPasshprase()
as well as disablePrivateKeys() to be consistent in naming.
1 parent 4c329d4 commit 43aa9b0

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

src/qt/createwalletdialog.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
2525
});
2626

2727
connect(ui->encrypt_wallet_checkbox, &QCheckBox::toggled, [this](bool checked) {
28-
// Disable disable_privkeys_checkbox when encrypt is set to true, enable it when encrypt is false
28+
// Disable the disable_privkeys_checkbox when isEncryptWalletChecked is
29+
// set to true, enable it when isEncryptWalletChecked is false.
2930
ui->disable_privkeys_checkbox->setEnabled(!checked);
3031

3132
// When the disable_privkeys_checkbox is disabled, uncheck it.
@@ -45,17 +46,17 @@ QString CreateWalletDialog::walletName() const
4546
return ui->wallet_name_line_edit->text();
4647
}
4748

48-
bool CreateWalletDialog::encrypt() const
49+
bool CreateWalletDialog::isEncryptWalletChecked() const
4950
{
5051
return ui->encrypt_wallet_checkbox->isChecked();
5152
}
5253

53-
bool CreateWalletDialog::disablePrivateKeys() const
54+
bool CreateWalletDialog::isDisablePrivateKeysChecked() const
5455
{
5556
return ui->disable_privkeys_checkbox->isChecked();
5657
}
5758

58-
bool CreateWalletDialog::blank() const
59+
bool CreateWalletDialog::isMakeBlankWalletChecked() const
5960
{
6061
return ui->blank_wallet_checkbox->isChecked();
6162
}

src/qt/createwalletdialog.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class CreateWalletDialog : public QDialog
2424
virtual ~CreateWalletDialog();
2525

2626
QString walletName() const;
27-
bool encrypt() const;
28-
bool disablePrivateKeys() const;
29-
bool blank() const;
27+
bool isEncryptWalletChecked() const;
28+
bool isDisablePrivateKeysChecked() const;
29+
bool isMakeBlankWalletChecked() const;
3030

3131
private:
3232
Ui::CreateWalletDialog *ui;

src/qt/walletcontroller.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ CreateWalletActivity::~CreateWalletActivity()
179179
delete m_passphrase_dialog;
180180
}
181181

182-
void CreateWalletActivity::askPasshprase()
182+
void CreateWalletActivity::askPassphrase()
183183
{
184184
m_passphrase_dialog = new AskPassphraseDialog(AskPassphraseDialog::Encrypt, m_parent_widget, &m_passphrase);
185185
m_passphrase_dialog->show();
@@ -201,10 +201,10 @@ void CreateWalletActivity::createWallet()
201201

202202
std::string name = m_create_wallet_dialog->walletName().toStdString();
203203
uint64_t flags = 0;
204-
if (m_create_wallet_dialog->disablePrivateKeys()) {
204+
if (m_create_wallet_dialog->isDisablePrivateKeysChecked()) {
205205
flags |= WALLET_FLAG_DISABLE_PRIVATE_KEYS;
206206
}
207-
if (m_create_wallet_dialog->blank()) {
207+
if (m_create_wallet_dialog->isMakeBlankWalletChecked()) {
208208
flags |= WALLET_FLAG_BLANK_WALLET;
209209
}
210210

@@ -246,8 +246,8 @@ void CreateWalletActivity::create()
246246
Q_EMIT finished();
247247
});
248248
connect(m_create_wallet_dialog, &QDialog::accepted, [this] {
249-
if (m_create_wallet_dialog->encrypt()) {
250-
askPasshprase();
249+
if (m_create_wallet_dialog->isEncryptWalletChecked()) {
250+
askPassphrase();
251251
} else {
252252
createWallet();
253253
}

src/qt/walletcontroller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class CreateWalletActivity : public WalletControllerActivity
118118
void created(WalletModel* wallet_model);
119119

120120
private:
121-
void askPasshprase();
121+
void askPassphrase();
122122
void createWallet();
123123
void finish();
124124

0 commit comments

Comments
 (0)