aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-11 19:50:12 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-14 19:18:54 +0300
commit7d0d4c04903cafade32be3bf2bf1cad3f33c6c03 (patch)
tree9dc6c0cb8f7d42b2e0b678961c8101dafb4d7a3f /src/qt
parentadf9bcfc37dbe93988588d1cfef8d9ee749be66f (diff)
qt: Add WalletFrame::currentWalletSet signal
The connection of the WalletFrame::currentWalletSet signal to the BitcoinGUI::updateWalletStatus is a shorter and more descriptive way to call both the setHDStatus and setEncryptionStatus member functions of the BitcoinGUI class in comparison to using of the WalletView::updateEncryptionStatus slot.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp1
-rw-r--r--src/qt/walletframe.cpp3
-rw-r--r--src/qt/walletframe.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index fe606519af..61d8be62d7 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -113,6 +113,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
connect(walletFrame, &WalletFrame::message, [this](const QString& title, const QString& message, unsigned int style) {
this->message(title, message, style);
});
+ connect(walletFrame, &WalletFrame::currentWalletSet, [this] { updateWalletStatus(); });
setCentralWidget(walletFrame);
} else
#endif // ENABLE_WALLET
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp
index 3d8bc0c7c5..30c29eb356 100644
--- a/src/qt/walletframe.cpp
+++ b/src/qt/walletframe.cpp
@@ -109,7 +109,8 @@ void WalletFrame::setCurrentWallet(WalletModel* wallet_model)
walletView->updateGeometry();
walletStack->setCurrentWidget(walletView);
- walletView->updateEncryptionStatus();
+
+ Q_EMIT currentWalletSet();
}
void WalletFrame::removeWallet(WalletModel* wallet_model)
diff --git a/src/qt/walletframe.h b/src/qt/walletframe.h
index fe42293abc..cbf6af95ec 100644
--- a/src/qt/walletframe.h
+++ b/src/qt/walletframe.h
@@ -49,6 +49,7 @@ public:
Q_SIGNALS:
void createWalletButtonClicked();
void message(const QString& title, const QString& message, unsigned int style);
+ void currentWalletSet();
private:
QStackedWidget *walletStack;