diff options
| author | John-Gee <[email protected]> | 2020-12-22 06:25:23 -0800 |
|---|---|---|
| committer | John-Gee <[email protected]> | 2021-02-02 03:54:57 -0800 |
| commit | 41406bfa1747a9c1038355a3ed4c5e455591afe8 (patch) | |
| tree | 67f6160f7cfa6232b5cc85269842f491c195a7c1 /src/qt/clientmodel.cpp | |
| parent | Merge pull request #1669 from carsenk/master (diff) | |
| download | discoin-41406bfa1747a9c1038355a3ed4c5e455591afe8.tar.xz discoin-41406bfa1747a9c1038355a3ed4c5e455591afe8.zip | |
Fix for Boost 1.74
Diffstat (limited to 'src/qt/clientmodel.cpp')
| -rw-r--r-- | src/qt/clientmodel.cpp | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 538bd9518..f134b04bb 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -24,6 +24,8 @@ #include <QDebug> #include <QTimer> +#include <boost/bind/bind.hpp> + class CBlockIndex; static const int64_t nClientStartupTime = GetTime(); @@ -330,23 +332,43 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, const CB void ClientModel::subscribeToCoreSignals() { // Connect signals to client - uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2)); - uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1)); - uiInterface.NotifyNetworkActiveChanged.connect(boost::bind(NotifyNetworkActiveChanged, this, _1)); - uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2)); + uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, + boost::placeholders::_1, + boost::placeholders::_2)); + uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, + boost::placeholders::_1)); + uiInterface.NotifyNetworkActiveChanged.connect(boost::bind(NotifyNetworkActiveChanged, this, + boost::placeholders::_1)); + uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, + boost::placeholders::_1, + boost::placeholders::_2)); uiInterface.BannedListChanged.connect(boost::bind(BannedListChanged, this)); - uiInterface.NotifyBlockTip.connect(boost::bind(BlockTipChanged, this, _1, _2, false)); - uiInterface.NotifyHeaderTip.connect(boost::bind(BlockTipChanged, this, _1, _2, true)); + uiInterface.NotifyBlockTip.connect(boost::bind(BlockTipChanged, this, + boost::placeholders::_1, + boost::placeholders::_2, false)); + uiInterface.NotifyHeaderTip.connect(boost::bind(BlockTipChanged, this, + boost::placeholders::_1, + boost::placeholders::_2, true)); } void ClientModel::unsubscribeFromCoreSignals() { // Disconnect signals from client - uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2)); - uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1)); - uiInterface.NotifyNetworkActiveChanged.disconnect(boost::bind(NotifyNetworkActiveChanged, this, _1)); - uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2)); + uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, + boost::placeholders::_1, + boost::placeholders::_2)); + uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, + boost::placeholders::_1)); + uiInterface.NotifyNetworkActiveChanged.disconnect(boost::bind(NotifyNetworkActiveChanged, this, + boost::placeholders::_1)); + uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, + boost::placeholders::_1, + boost::placeholders::_2)); uiInterface.BannedListChanged.disconnect(boost::bind(BannedListChanged, this)); - uiInterface.NotifyBlockTip.disconnect(boost::bind(BlockTipChanged, this, _1, _2, false)); - uiInterface.NotifyHeaderTip.disconnect(boost::bind(BlockTipChanged, this, _1, _2, true)); + uiInterface.NotifyBlockTip.disconnect(boost::bind(BlockTipChanged, this, + boost::placeholders::_1, + boost::placeholders::_2, false)); + uiInterface.NotifyHeaderTip.disconnect(boost::bind(BlockTipChanged, this, + boost::placeholders::_1, + boost::placeholders::_2, true)); } |