mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-13 11:25:02 -05:00
refactor: Simplify connection syntax
This commit is contained in:
parent
7d0a8f4f53
commit
1a53b0da60
3 changed files with 3 additions and 9 deletions
|
@ -361,9 +361,7 @@ void BitcoinApplication::initializeResult(bool success)
|
||||||
if (paymentServer) {
|
if (paymentServer) {
|
||||||
connect(paymentServer, &PaymentServer::receivedPaymentRequest, window, &BitcoinGUI::handlePaymentRequest);
|
connect(paymentServer, &PaymentServer::receivedPaymentRequest, window, &BitcoinGUI::handlePaymentRequest);
|
||||||
connect(window, &BitcoinGUI::receivedURI, paymentServer, &PaymentServer::handleURIOrFile);
|
connect(window, &BitcoinGUI::receivedURI, paymentServer, &PaymentServer::handleURIOrFile);
|
||||||
connect(paymentServer, &PaymentServer::message, [this](const QString& title, const QString& message, unsigned int style) {
|
connect(paymentServer, &PaymentServer::message, window, &BitcoinGUI::message);
|
||||||
window->message(title, message, style);
|
|
||||||
});
|
|
||||||
QTimer::singleShot(100, paymentServer, &PaymentServer::uiReady);
|
QTimer::singleShot(100, paymentServer, &PaymentServer::uiReady);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -564,9 +564,7 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
|
||||||
connect(_clientModel, &ClientModel::numBlocksChanged, this, &BitcoinGUI::setNumBlocks);
|
connect(_clientModel, &ClientModel::numBlocksChanged, this, &BitcoinGUI::setNumBlocks);
|
||||||
|
|
||||||
// Receive and report messages from client model
|
// Receive and report messages from client model
|
||||||
connect(_clientModel, &ClientModel::message, [this](const QString &title, const QString &message, unsigned int style){
|
connect(_clientModel, &ClientModel::message, this, &BitcoinGUI::message);
|
||||||
this->message(title, message, style);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Show progress dialog
|
// Show progress dialog
|
||||||
connect(_clientModel, &ClientModel::showProgress, this, &BitcoinGUI::showProgress);
|
connect(_clientModel, &ClientModel::showProgress, this, &BitcoinGUI::showProgress);
|
||||||
|
|
|
@ -97,9 +97,7 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui)
|
||||||
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, gui, &BitcoinGUI::gotoHistoryPage);
|
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, gui, &BitcoinGUI::gotoHistoryPage);
|
||||||
|
|
||||||
// Receive and report messages
|
// Receive and report messages
|
||||||
connect(this, &WalletView::message, [gui](const QString &title, const QString &message, unsigned int style) {
|
connect(this, &WalletView::message, gui, &BitcoinGUI::message);
|
||||||
gui->message(title, message, style);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Pass through encryption status changed signals
|
// Pass through encryption status changed signals
|
||||||
connect(this, &WalletView::encryptionStatusChanged, gui, &BitcoinGUI::updateWalletStatus);
|
connect(this, &WalletView::encryptionStatusChanged, gui, &BitcoinGUI::updateWalletStatus);
|
||||||
|
|
Loading…
Add table
Reference in a new issue