Skip to content

Commit 3eb6d5b

Browse files
committed
qt: Make path to showModalOverlay slot shorter
This commit does not change behavior.
1 parent f7e799b commit 3eb6d5b

File tree

5 files changed

+2
-26
lines changed

5 files changed

+2
-26
lines changed

src/qt/bitcoingui.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,6 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
204204
modalOverlay = new ModalOverlay(enableWallet, this->centralWidget());
205205
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
206206
connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
207-
#ifdef ENABLE_WALLET
208-
if(enableWallet) {
209-
connect(walletFrame, &WalletFrame::requestedSyncWarningInfo, this, &BitcoinGUI::showModalOverlay);
210-
}
211-
#endif
212207

213208
#ifdef Q_OS_MAC
214209
m_app_nap_inhibitor = new CAppNapInhibitor;
@@ -673,7 +668,7 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
673668
m_wallet_selector_action->setVisible(true);
674669
}
675670

676-
connect(walletView, &WalletView::outOfSyncWarningClicked, walletFrame, &WalletFrame::outOfSyncWarningClicked);
671+
connect(walletView, &WalletView::outOfSyncWarningClicked, this, &BitcoinGUI::showModalOverlay);
677672
connect(walletView, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage);
678673
connect(walletView, &WalletView::coinsSent, this, &BitcoinGUI::gotoHistoryPage);
679674
connect(walletView, &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
@@ -208,8 +208,3 @@ WalletModel* WalletFrame::currentWalletModel() const
208208
WalletView* wallet_view = currentWalletView();
209209
return wallet_view ? wallet_view->getWalletModel() : nullptr;
210210
}
211-
212-
void WalletFrame::outOfSyncWarningClicked()
213-
{
214-
Q_EMIT requestedSyncWarningInfo();
215-
}

src/qt/walletframe.h

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

4444
void showOutOfSyncWarning(bool fShow);
4545

46-
Q_SIGNALS:
47-
/** Notify that the user has requested more information about the out-of-sync warning */
48-
void requestedSyncWarningInfo();
49-
5046
private:
5147
QStackedWidget *walletStack;
5248
ClientModel *clientModel;
@@ -88,8 +84,6 @@ public Q_SLOTS:
8884
void usedSendingAddresses();
8985
/** Show used receiving addresses */
9086
void usedReceivingAddresses();
91-
/** Pass on signal over requested out-of-sync-warning information */
92-
void outOfSyncWarningClicked();
9387
};
9488

9589
#endif // BITCOIN_QT_WALLETFRAME_H

src/qt/walletview.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ WalletView::WalletView(const PlatformStyle *_platformStyle, QWidget *parent):
7373
// Clicking on a transaction on the overview pre-selects the transaction on the transaction history page
7474
connect(overviewPage, &OverviewPage::transactionClicked, transactionView, static_cast<void (TransactionView::*)(const QModelIndex&)>(&TransactionView::focusTransaction));
7575

76-
connect(overviewPage, &OverviewPage::outOfSyncWarningClicked, this, &WalletView::requestedSyncWarningInfo);
76+
connect(overviewPage, &OverviewPage::outOfSyncWarningClicked, this, &WalletView::outOfSyncWarningClicked);
7777

7878
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, this, &WalletView::coinsSent);
7979
// Highlight transaction after send
@@ -347,8 +347,3 @@ void WalletView::showProgress(const QString &title, int nProgress)
347347
}
348348
}
349349
}
350-
351-
void WalletView::requestedSyncWarningInfo()
352-
{
353-
Q_EMIT outOfSyncWarningClicked();
354-
}

src/qt/walletview.h

-3
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ public Q_SLOTS:
111111
/** Show progress dialog e.g. for rescan */
112112
void showProgress(const QString &title, int nProgress);
113113

114-
/** User has requested more information about the out of sync state */
115-
void requestedSyncWarningInfo();
116-
117114
Q_SIGNALS:
118115
void setPrivacy(bool privacy);
119116
void transactionClicked();

0 commit comments

Comments
 (0)