aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorJohn-Gee <[email protected]>2020-12-22 06:25:23 -0800
committerJohn-Gee <[email protected]>2021-02-02 03:54:57 -0800
commit41406bfa1747a9c1038355a3ed4c5e455591afe8 (patch)
tree67f6160f7cfa6232b5cc85269842f491c195a7c1 /src/qt
parentMerge pull request #1669 from carsenk/master (diff)
downloaddiscoin-41406bfa1747a9c1038355a3ed4c5e455591afe8.tar.xz
discoin-41406bfa1747a9c1038355a3ed4c5e455591afe8.zip
Fix for Boost 1.74
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp22
-rw-r--r--src/qt/clientmodel.cpp46
-rw-r--r--src/qt/splashscreen.cpp26
-rw-r--r--src/qt/transactiontablemodel.cpp19
-rw-r--r--src/qt/walletmodel.cpp46
5 files changed, 122 insertions, 37 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 4ffde76cf..71c1fd355 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -75,6 +75,8 @@ const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
#endif
;
+#include <boost/bind/bind.hpp>
+
/** Display name for default wallet name. Uses tilde to avoid name
* collisions in the future with additional wallets */
const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
@@ -1196,15 +1198,27 @@ static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, co
void BitcoinGUI::subscribeToCoreSignals()
{
// Connect signals to client
- uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
- uiInterface.ThreadSafeQuestion.connect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
+ uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2,
+ boost::placeholders::_3));
+ uiInterface.ThreadSafeQuestion.connect(boost::bind(ThreadSafeMessageBox, this,
+ boost::placeholders::_1,
+ boost::placeholders::_3,
+ boost::placeholders::_4));
}
void BitcoinGUI::unsubscribeFromCoreSignals()
{
// Disconnect signals from client
- uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
- uiInterface.ThreadSafeQuestion.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
+ uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2,
+ boost::placeholders::_3));
+ uiInterface.ThreadSafeQuestion.disconnect(boost::bind(ThreadSafeMessageBox, this,
+ boost::placeholders::_1,
+ boost::placeholders::_3,
+ boost::placeholders::_4));
}
void BitcoinGUI::toggleNetworkActive()
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));
}
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 656a2875c..c271c7fb9 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -26,6 +26,8 @@
#include <QPainter>
#include <QRadialGradient>
+#include <boost/bind/bind.hpp>
+
SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) :
QWidget(0, f), curAlignment(0)
{
@@ -167,7 +169,9 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
#ifdef ENABLE_WALLET
void SplashScreen::ConnectWallet(CWallet* wallet)
{
- wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
+ wallet->ShowProgress.connect(boost::bind(ShowProgress, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2));
connectedWallets.push_back(wallet);
}
#endif
@@ -175,21 +179,29 @@ void SplashScreen::ConnectWallet(CWallet* wallet)
void SplashScreen::subscribeToCoreSignals()
{
// Connect signals to client
- uiInterface.InitMessage.connect(boost::bind(InitMessage, this, _1));
- uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
+ uiInterface.InitMessage.connect(boost::bind(InitMessage, this,
+ boost::placeholders::_1));
+ uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this,
+ boost::placeholders::_1,boost::placeholders::_2));
#ifdef ENABLE_WALLET
- uiInterface.LoadWallet.connect(boost::bind(&SplashScreen::ConnectWallet, this, _1));
+ uiInterface.LoadWallet.connect(boost::bind(&SplashScreen::ConnectWallet, this,
+ boost::placeholders::_1));
#endif
}
void SplashScreen::unsubscribeFromCoreSignals()
{
// Disconnect signals from client
- uiInterface.InitMessage.disconnect(boost::bind(InitMessage, this, _1));
- uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
+ uiInterface.InitMessage.disconnect(boost::bind(InitMessage, this,
+ boost::placeholders::_1));
+ uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2));
#ifdef ENABLE_WALLET
Q_FOREACH(CWallet* const & pwallet, connectedWallets) {
- pwallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
+ pwallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2));
}
#endif
}
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 61466c8ed..57d6787c2 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -26,6 +26,7 @@
#include <QIcon>
#include <QList>
+#include <boost/bind/bind.hpp>
#include <boost/foreach.hpp>
// Amount column is right-aligned it contains numbers
@@ -777,13 +778,23 @@ static void ShowProgress(TransactionTableModel *ttm, const std::string &title, i
void TransactionTableModel::subscribeToCoreSignals()
{
// Connect signals to wallet
- wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
- wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
+ wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2,
+ boost::placeholders::_3));
+ wallet->ShowProgress.connect(boost::bind(ShowProgress, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2));
}
void TransactionTableModel::unsubscribeFromCoreSignals()
{
// Disconnect signals from wallet
- wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
- wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
+ wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2,
+ boost::placeholders::_3));
+ wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2));
}
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 0a5a7c3e9..fb893ae25 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -28,6 +28,7 @@
#include <QSet>
#include <QTimer>
+#include <boost/bind/bind.hpp>
#include <boost/foreach.hpp>
WalletModel::WalletModel(const PlatformStyle *platformStyle, CWallet *_wallet, OptionsModel *_optionsModel, QObject *parent) :
@@ -502,21 +503,46 @@ static void NotifyWatchonlyChanged(WalletModel *walletmodel, bool fHaveWatchonly
void WalletModel::subscribeToCoreSignals()
{
// Connect signals to wallet
- wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
- wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5, _6));
- wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
- wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
- wallet->NotifyWatchonlyChanged.connect(boost::bind(NotifyWatchonlyChanged, this, _1));
+ wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this,
+ boost::placeholders::_1));
+ wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2,
+ boost::placeholders::_3,
+ boost::placeholders::_4,
+ boost::placeholders::_5,
+ boost::placeholders::_6));
+ wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2,
+ boost::placeholders::_3));
+ wallet->ShowProgress.connect(boost::bind(ShowProgress, this, boost::placeholders::_1,
+ boost::placeholders::_2));
+ wallet->NotifyWatchonlyChanged.connect(boost::bind(NotifyWatchonlyChanged, this,
+ boost::placeholders::_1));
}
void WalletModel::unsubscribeFromCoreSignals()
{
// Disconnect signals from wallet
- wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
- wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5, _6));
- wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
- wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
- wallet->NotifyWatchonlyChanged.disconnect(boost::bind(NotifyWatchonlyChanged, this, _1));
+ wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this,
+ boost::placeholders::_1));
+ wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2,
+ boost::placeholders::_3,
+ boost::placeholders::_4,
+ boost::placeholders::_5,
+ boost::placeholders::_6));
+ wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2,
+ boost::placeholders::_3));
+ wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this,
+ boost::placeholders::_1,
+ boost::placeholders::_2));
+ wallet->NotifyWatchonlyChanged.disconnect(boost::bind(NotifyWatchonlyChanged, this,
+ boost::placeholders::_1));
}
// WalletModel::UnlockContext implementation