mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
qt: Fix wallet encryption dialog (#3816)
Do not rely on `checked` status of `encryptWalletAction`
This commit is contained in:
parent
67624ec21b
commit
ccef3b4836
@ -575,7 +575,7 @@ void BitcoinGUI::createActions()
|
||||
#ifdef ENABLE_WALLET
|
||||
if(walletFrame)
|
||||
{
|
||||
connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool)));
|
||||
connect(encryptWalletAction, SIGNAL(triggered()), walletFrame, SLOT(encryptWallet()));
|
||||
connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet()));
|
||||
connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase()));
|
||||
connect(unlockWalletAction, SIGNAL(triggered()), walletFrame, SLOT(unlockWallet()));
|
||||
|
@ -166,11 +166,11 @@ void WalletFrame::gotoVerifyMessageTab(QString addr)
|
||||
walletView->gotoVerifyMessageTab(addr);
|
||||
}
|
||||
|
||||
void WalletFrame::encryptWallet(bool status)
|
||||
void WalletFrame::encryptWallet()
|
||||
{
|
||||
WalletView *walletView = currentWalletView();
|
||||
if (walletView)
|
||||
walletView->encryptWallet(status);
|
||||
walletView->encryptWallet();
|
||||
}
|
||||
|
||||
void WalletFrame::backupWallet()
|
||||
|
@ -79,7 +79,7 @@ public Q_SLOTS:
|
||||
void gotoVerifyMessageTab(QString addr = "");
|
||||
|
||||
/** Encrypt the wallet */
|
||||
void encryptWallet(bool status);
|
||||
void encryptWallet();
|
||||
/** Backup the wallet */
|
||||
void backupWallet();
|
||||
/** Change encrypted wallet passphrase */
|
||||
|
@ -299,11 +299,11 @@ void WalletView::updateEncryptionStatus()
|
||||
Q_EMIT encryptionStatusChanged(walletModel->getEncryptionStatus());
|
||||
}
|
||||
|
||||
void WalletView::encryptWallet(bool status)
|
||||
void WalletView::encryptWallet()
|
||||
{
|
||||
if(!walletModel)
|
||||
return;
|
||||
AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt : AskPassphraseDialog::Decrypt, this);
|
||||
AskPassphraseDialog dlg(AskPassphraseDialog::Encrypt, this);
|
||||
dlg.setModel(walletModel);
|
||||
dlg.exec();
|
||||
|
||||
|
@ -99,7 +99,7 @@ public Q_SLOTS:
|
||||
*/
|
||||
void processNewTransaction(const QModelIndex& parent, int start, int /*end*/);
|
||||
/** Encrypt the wallet */
|
||||
void encryptWallet(bool status);
|
||||
void encryptWallet();
|
||||
/** Backup the wallet */
|
||||
void backupWallet();
|
||||
/** Change encrypted wallet passphrase */
|
||||
|
Loading…
Reference in New Issue
Block a user