From 3eb6d5b4068194f3420a9f8b30cffd210ca7265b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 10 Jul 2020 12:39:09 +0300 Subject: [PATCH] qt: Make path to showModalOverlay slot shorter This commit does not change behavior. --- src/qt/bitcoingui.cpp | 7 +------ src/qt/walletframe.cpp | 5 ----- src/qt/walletframe.h | 6 ------ src/qt/walletview.cpp | 7 +------ src/qt/walletview.h | 3 --- 5 files changed, 2 insertions(+), 26 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 7f366d27c5f..46e901c1591 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -204,11 +204,6 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty modalOverlay = new ModalOverlay(enableWallet, this->centralWidget()); connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay); connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay); -#ifdef ENABLE_WALLET - if(enableWallet) { - connect(walletFrame, &WalletFrame::requestedSyncWarningInfo, this, &BitcoinGUI::showModalOverlay); - } -#endif #ifdef Q_OS_MAC m_app_nap_inhibitor = new CAppNapInhibitor; @@ -673,7 +668,7 @@ void BitcoinGUI::addWallet(WalletModel* walletModel) m_wallet_selector_action->setVisible(true); } - connect(walletView, &WalletView::outOfSyncWarningClicked, walletFrame, &WalletFrame::outOfSyncWarningClicked); + connect(walletView, &WalletView::outOfSyncWarningClicked, this, &BitcoinGUI::showModalOverlay); connect(walletView, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage); connect(walletView, &WalletView::coinsSent, this, &BitcoinGUI::gotoHistoryPage); connect(walletView, &WalletView::message, [this](const QString& title, const QString& message, unsigned int style) { diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index dc6f5da19b0..a1b72eeaf33 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -208,8 +208,3 @@ WalletModel* WalletFrame::currentWalletModel() const WalletView* wallet_view = currentWalletView(); return wallet_view ? wallet_view->getWalletModel() : nullptr; } - -void WalletFrame::outOfSyncWarningClicked() -{ - Q_EMIT requestedSyncWarningInfo(); -} diff --git a/src/qt/walletframe.h b/src/qt/walletframe.h index 02c392a973e..de756cb3b9f 100644 --- a/src/qt/walletframe.h +++ b/src/qt/walletframe.h @@ -43,10 +43,6 @@ class WalletFrame : public QFrame void showOutOfSyncWarning(bool fShow); -Q_SIGNALS: - /** Notify that the user has requested more information about the out-of-sync warning */ - void requestedSyncWarningInfo(); - private: QStackedWidget *walletStack; ClientModel *clientModel; @@ -88,8 +84,6 @@ public Q_SLOTS: void usedSendingAddresses(); /** Show used receiving addresses */ void usedReceivingAddresses(); - /** Pass on signal over requested out-of-sync-warning information */ - void outOfSyncWarningClicked(); }; #endif // BITCOIN_QT_WALLETFRAME_H diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 2fc883a5f55..73be44f8f55 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -73,7 +73,7 @@ WalletView::WalletView(const PlatformStyle *_platformStyle, QWidget *parent): // Clicking on a transaction on the overview pre-selects the transaction on the transaction history page connect(overviewPage, &OverviewPage::transactionClicked, transactionView, static_cast(&TransactionView::focusTransaction)); - connect(overviewPage, &OverviewPage::outOfSyncWarningClicked, this, &WalletView::requestedSyncWarningInfo); + connect(overviewPage, &OverviewPage::outOfSyncWarningClicked, this, &WalletView::outOfSyncWarningClicked); connect(sendCoinsPage, &SendCoinsDialog::coinsSent, this, &WalletView::coinsSent); // Highlight transaction after send @@ -347,8 +347,3 @@ void WalletView::showProgress(const QString &title, int nProgress) } } } - -void WalletView::requestedSyncWarningInfo() -{ - Q_EMIT outOfSyncWarningClicked(); -} diff --git a/src/qt/walletview.h b/src/qt/walletview.h index f186554758f..45002d3cc9e 100644 --- a/src/qt/walletview.h +++ b/src/qt/walletview.h @@ -111,9 +111,6 @@ public Q_SLOTS: /** Show progress dialog e.g. for rescan */ void showProgress(const QString &title, int nProgress); - /** User has requested more information about the out of sync state */ - void requestedSyncWarningInfo(); - Q_SIGNALS: void setPrivacy(bool privacy); void transactionClicked();