WalletView::setBitcoinGUI
to the only caller. Two new signals are added beforehand in the first commit so that the connections in WalletFrame
are all from the wallet view.
WalletView::setBitcoinGUI
to the only caller. Two new signals are added beforehand in the first commit so that the connections in WalletFrame
are all from the wallet view.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
60@@ -62,6 +61,14 @@ bool WalletFrame::addWallet(WalletModel *walletModel)
61 mapWalletViews[walletModel] = walletView;
62
63 connect(walletView, &WalletView::outOfSyncWarningClicked, this, &WalletFrame::outOfSyncWarningClicked);
64+ connect(walletView, &WalletView::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage);
65+ connect(walletView, &WalletView::coinsSent, gui, &BitcoinGUI::gotoHistoryPage);
66+ connect(walletView, &WalletView::message, [this](const QString& title, const QString& message, unsigned int style) {
67+ gui->message(title, message, style);
68+ });
[this]
/[gui]
/ ?
gui
is a member.
oops
BitcoinGUI::message
is a slot, and there is no need to capture local variable gui
.
Why not use non-lambda connection syntax?
nm: it does not work too, but could work if remove unused default parameter from
BitcoinGUI::message
signature.
w.r.t. #17500 (comment)
It seems a bit of formalization could be helpful for our community. How about:
Qt Slots and Signals
Do no make connections to external signals or slots in the QObject
subclass implementation.
Rationale: Do not introduce needless dependencies.