Skip to content

Commit faf0639

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 ac2761b commit faf0639

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

src/qt/bitcoingui.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,6 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
208208

209209
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
210210
connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
211-
#ifdef ENABLE_WALLET
212-
if(enableWallet) {
213-
connect(walletFrame, &WalletFrame::requestedSyncWarningInfo, this, &BitcoinGUI::showModalOverlay);
214-
}
215-
#endif
216211

217212
#ifdef Q_OS_MAC
218213
m_app_nap_inhibitor = new CAppNapInhibitor;

src/qt/walletframe.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ bool WalletFrame::addWallet(WalletModel *walletModel)
8888
walletStack->addWidget(walletView);
8989
mapWalletViews[walletModel] = walletView;
9090

91-
connect(walletView, &WalletView::outOfSyncWarningClicked, this, &WalletFrame::outOfSyncWarningClicked);
91+
connect(walletView, &WalletView::outOfSyncWarningClicked, gui, &BitcoinGUI::showModalOverlay);
9292
connect(walletView, &WalletView::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage);
9393
connect(walletView, &WalletView::coinsSent, gui, &BitcoinGUI::gotoHistoryPage);
9494
connect(walletView, &WalletView::message, [this](const QString& title, const QString& message, unsigned int style) {
@@ -263,8 +263,3 @@ WalletModel* WalletFrame::currentWalletModel() const
263263
WalletView* wallet_view = currentWalletView();
264264
return wallet_view ? wallet_view->getWalletModel() : nullptr;
265265
}
266-
267-
void WalletFrame::outOfSyncWarningClicked()
268-
{
269-
Q_EMIT requestedSyncWarningInfo();
270-
}

src/qt/walletframe.h

-6
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ class WalletFrame : public QFrame
4747

4848
QSize sizeHint() const override { return m_size_hint; }
4949

50-
Q_SIGNALS:
51-
/** Notify that the user has requested more information about the out-of-sync warning */
52-
void requestedSyncWarningInfo();
53-
5450
private:
5551
QStackedWidget *walletStack;
5652
BitcoinGUI *gui;
@@ -98,8 +94,6 @@ public Q_SLOTS:
9894
void usedSendingAddresses();
9995
/** Show used receiving addresses */
10096
void usedReceivingAddresses();
101-
/** Pass on signal over requested out-of-sync-warning information */
102-
void outOfSyncWarningClicked();
10397
};
10498

10599
#endif // BITCOIN_QT_WALLETFRAME_H

0 commit comments

Comments
 (0)