mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-21 01:11:43 +02:00
qt: Connect WalletView signal to BitcoinGUI slot directly
This change removes redundant intermediate WalletFrame connections. This commit does not change behavior.
This commit is contained in:
parent
bd50ff9290
commit
f507681baa
@ -211,11 +211,6 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||||||
|
|
||||||
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
|
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
|
||||||
connect(progressBar, &GUIUtil::ClickableProgressBar::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
|
#ifdef Q_OS_MAC
|
||||||
m_app_nap_inhibitor = new CAppNapInhibitor;
|
m_app_nap_inhibitor = new CAppNapInhibitor;
|
||||||
@ -690,7 +685,7 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
|
|||||||
const QString display_name = walletModel->getDisplayName();
|
const QString display_name = walletModel->getDisplayName();
|
||||||
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
|
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
|
||||||
|
|
||||||
connect(wallet_view, &WalletView::outOfSyncWarningClicked, walletFrame, &WalletFrame::outOfSyncWarningClicked);
|
connect(wallet_view, &WalletView::outOfSyncWarningClicked, this, &BitcoinGUI::showModalOverlay);
|
||||||
connect(wallet_view, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage);
|
connect(wallet_view, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage);
|
||||||
connect(wallet_view, &WalletView::coinsSent, this, &BitcoinGUI::gotoHistoryPage);
|
connect(wallet_view, &WalletView::coinsSent, this, &BitcoinGUI::gotoHistoryPage);
|
||||||
connect(wallet_view, &WalletView::message, [this](const QString& title, const QString& message, unsigned int style) {
|
connect(wallet_view, &WalletView::message, [this](const QString& title, const QString& message, unsigned int style) {
|
||||||
|
@ -242,8 +242,3 @@ WalletModel* WalletFrame::currentWalletModel() const
|
|||||||
WalletView* wallet_view = currentWalletView();
|
WalletView* wallet_view = currentWalletView();
|
||||||
return wallet_view ? wallet_view->getWalletModel() : nullptr;
|
return wallet_view ? wallet_view->getWalletModel() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletFrame::outOfSyncWarningClicked()
|
|
||||||
{
|
|
||||||
Q_EMIT requestedSyncWarningInfo();
|
|
||||||
}
|
|
||||||
|
@ -47,9 +47,6 @@ public:
|
|||||||
QSize sizeHint() const override { return m_size_hint; }
|
QSize sizeHint() const override { return m_size_hint; }
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
/** Notify that the user has requested more information about the out-of-sync warning */
|
|
||||||
void requestedSyncWarningInfo();
|
|
||||||
|
|
||||||
void createWalletButtonClicked();
|
void createWalletButtonClicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -98,8 +95,6 @@ public Q_SLOTS:
|
|||||||
void usedSendingAddresses();
|
void usedSendingAddresses();
|
||||||
/** Show used receiving addresses */
|
/** Show used receiving addresses */
|
||||||
void usedReceivingAddresses();
|
void usedReceivingAddresses();
|
||||||
/** Pass on signal over requested out-of-sync-warning information */
|
|
||||||
void outOfSyncWarningClicked();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BITCOIN_QT_WALLETFRAME_H
|
#endif // BITCOIN_QT_WALLETFRAME_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user