aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-07-10 11:23:47 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-08-27 14:33:00 -0400
commit24bf17602c620445f76c3b407937751c8a894d37 (patch)
tree1c7476044d97dacedd1a85725c652068e0b84548 /src/qt
parente4f435047121886edb6e6a6c4e4998e44ed2e36a (diff)
downloadbitcoin-24bf17602c620445f76c3b407937751c8a894d37.tar.xz
gui refactor: Inline SplashScreen::ConnectWallet
Suggested https://github.com/bitcoin/bitcoin/pull/19099#discussion_r450522201
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/splashscreen.cpp12
-rw-r--r--src/qt/splashscreen.h2
2 files changed, 4 insertions, 10 deletions
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index d9861b7953..8e381861a0 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -185,13 +185,6 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
: _("press q to shutdown").translated) +
strprintf("\n%d", nProgress) + "%");
}
-#ifdef ENABLE_WALLET
-void SplashScreen::ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet)
-{
- m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, false)));
- m_connected_wallets.emplace_back(std::move(wallet));
-}
-#endif
void SplashScreen::subscribeToCoreSignals()
{
@@ -203,7 +196,10 @@ void SplashScreen::subscribeToCoreSignals()
void SplashScreen::handleLoadWallet()
{
#ifdef ENABLE_WALLET
- m_handler_load_wallet = m_node->walletClient().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) { ConnectWallet(std::move(wallet)); });
+ m_handler_load_wallet = m_node->walletClient().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) {
+ m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, false)));
+ m_connected_wallets.emplace_back(std::move(wallet));
+ });
#endif
}
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index d4e3f6ece1..a0cd677d3d 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -56,8 +56,6 @@ private:
void unsubscribeFromCoreSignals();
/** Initiate shutdown */
void shutdown();
- /** Connect wallet signals to splash screen */
- void ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet);
QPixmap pixmap;
QString curMessage;