diff options
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)); } |