Skip to content

Commit 24bf176

Browse files
committed
gui refactor: Inline SplashScreen::ConnectWallet
Suggested bitcoin/bitcoin#19099 (comment)
1 parent e4f4350 commit 24bf176

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/qt/splashscreen.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,6 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
185185
: _("press q to shutdown").translated) +
186186
strprintf("\n%d", nProgress) + "%");
187187
}
188-
#ifdef ENABLE_WALLET
189-
void SplashScreen::ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet)
190-
{
191-
m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, false)));
192-
m_connected_wallets.emplace_back(std::move(wallet));
193-
}
194-
#endif
195188

196189
void SplashScreen::subscribeToCoreSignals()
197190
{
@@ -203,7 +196,10 @@ void SplashScreen::subscribeToCoreSignals()
203196
void SplashScreen::handleLoadWallet()
204197
{
205198
#ifdef ENABLE_WALLET
206-
m_handler_load_wallet = m_node->walletClient().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) { ConnectWallet(std::move(wallet)); });
199+
m_handler_load_wallet = m_node->walletClient().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) {
200+
m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, false)));
201+
m_connected_wallets.emplace_back(std::move(wallet));
202+
});
207203
#endif
208204
}
209205

src/qt/splashscreen.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ public Q_SLOTS:
5656
void unsubscribeFromCoreSignals();
5757
/** Initiate shutdown */
5858
void shutdown();
59-
/** Connect wallet signals to splash screen */
60-
void ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet);
6159

6260
QPixmap pixmap;
6361
QString curMessage;

0 commit comments

Comments
 (0)