Skip to content

Commit f507681

Browse files
committed
qt: Connect WalletView signal to BitcoinGUI slot directly
This change removes redundant intermediate WalletFrame connections. This commit does not change behavior.
1 parent bd50ff9 commit f507681

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

src/qt/bitcoingui.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,6 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
211211

212212
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
213213
connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
214-
#ifdef ENABLE_WALLET
215-
if(enableWallet) {
216-
connect(walletFrame, &WalletFrame::requestedSyncWarningInfo, this, &BitcoinGUI::showModalOverlay);
217-
}
218-
#endif
219214

220215
#ifdef Q_OS_MAC
221216
m_app_nap_inhibitor = new CAppNapInhibitor;
@@ -690,7 +685,7 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
690685
const QString display_name = walletModel->getDisplayName();
691686
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
692687

693-
connect(wallet_view, &WalletView::outOfSyncWarningClicked, walletFrame, &WalletFrame::outOfSyncWarningClicked);
688+
connect(wallet_view, &WalletView::outOfSyncWarningClicked, this, &BitcoinGUI::showModalOverlay);
694689
connect(wallet_view, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage);
695690
connect(wallet_view, &WalletView::coinsSent, this, &BitcoinGUI::gotoHistoryPage);
696691
connect(wallet_view, &WalletView::message, [this](const QString& title, const QString& message, unsigned int style) {

src/qt/walletframe.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,3 @@ WalletModel* WalletFrame::currentWalletModel() const
242242
WalletView* wallet_view = currentWalletView();
243243
return wallet_view ? wallet_view->getWalletModel() : nullptr;
244244
}
245-
246-
void WalletFrame::outOfSyncWarningClicked()
247-
{
248-
Q_EMIT requestedSyncWarningInfo();
249-
}

src/qt/walletframe.h

-5
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ class WalletFrame : public QFrame
4747
QSize sizeHint() const override { return m_size_hint; }
4848

4949
Q_SIGNALS:
50-
/** Notify that the user has requested more information about the out-of-sync warning */
51-
void requestedSyncWarningInfo();
52-
5350
void createWalletButtonClicked();
5451

5552
private:
@@ -98,8 +95,6 @@ public Q_SLOTS:
9895
void usedSendingAddresses();
9996
/** Show used receiving addresses */
10097
void usedReceivingAddresses();
101-
/** Pass on signal over requested out-of-sync-warning information */
102-
void outOfSyncWarningClicked();
10398
};
10499

105100
#endif // BITCOIN_QT_WALLETFRAME_H

0 commit comments

Comments
 (0)