Skip to content

Commit

Permalink
qt: Make path to showModalOverlay slot shorter
Browse files Browse the repository at this point in the history
This commit does not change behavior.
  • Loading branch information
hebasto committed Jul 10, 2020
1 parent f7e799b commit 3eb6d5b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 26 deletions.
7 changes: 1 addition & 6 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions src/qt/walletframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
6 changes: 0 additions & 6 deletions src/qt/walletframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
7 changes: 1 addition & 6 deletions src/qt/walletview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<void (TransactionView::*)(const QModelIndex&)>(&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
Expand Down Expand Up @@ -347,8 +347,3 @@ void WalletView::showProgress(const QString &title, int nProgress)
}
}
}

void WalletView::requestedSyncWarningInfo()
{
Q_EMIT outOfSyncWarningClicked();
}
3 changes: 0 additions & 3 deletions src/qt/walletview.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3eb6d5b

Please sign in to comment.