From 1a53b0da60097cd7fd423c519f01ceca0fd0aa14 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 16 Jan 2020 20:44:21 +0200 Subject: refactor: Simplify connection syntax --- src/qt/bitcoin.cpp | 4 +--- src/qt/bitcoingui.cpp | 4 +--- src/qt/walletview.cpp | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 4313d6ee7f..12a620c57a 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -361,9 +361,7 @@ void BitcoinApplication::initializeResult(bool success) if (paymentServer) { connect(paymentServer, &PaymentServer::receivedPaymentRequest, window, &BitcoinGUI::handlePaymentRequest); connect(window, &BitcoinGUI::receivedURI, paymentServer, &PaymentServer::handleURIOrFile); - connect(paymentServer, &PaymentServer::message, [this](const QString& title, const QString& message, unsigned int style) { - window->message(title, message, style); - }); + connect(paymentServer, &PaymentServer::message, window, &BitcoinGUI::message); QTimer::singleShot(100, paymentServer, &PaymentServer::uiReady); } #endif diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index eb68074301..6043e93f92 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -564,9 +564,7 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel) connect(_clientModel, &ClientModel::numBlocksChanged, this, &BitcoinGUI::setNumBlocks); // Receive and report messages from client model - connect(_clientModel, &ClientModel::message, [this](const QString &title, const QString &message, unsigned int style){ - this->message(title, message, style); - }); + connect(_clientModel, &ClientModel::message, this, &BitcoinGUI::message); // Show progress dialog connect(_clientModel, &ClientModel::showProgress, this, &BitcoinGUI::showProgress); diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index c777d633be..d0a4a622a9 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -97,9 +97,7 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui) connect(sendCoinsPage, &SendCoinsDialog::coinsSent, gui, &BitcoinGUI::gotoHistoryPage); // Receive and report messages - connect(this, &WalletView::message, [gui](const QString &title, const QString &message, unsigned int style) { - gui->message(title, message, style); - }); + connect(this, &WalletView::message, gui, &BitcoinGUI::message); // Pass through encryption status changed signals connect(this, &WalletView::encryptionStatusChanged, gui, &BitcoinGUI::updateWalletStatus); -- cgit v1.2.3