diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-03-20 12:27:07 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2017-03-20 12:27:07 -0400 |
commit | d5046e72f4180b7932368919ae08da24be8e9583 (patch) | |
tree | 3f1140ce24eac604f6b02715eb0bfe8356f11d2e /src/qt/test/wallettests.cpp | |
parent | d34995a7bac6ed20ce42aa00c6252b900786e649 (diff) |
Avoid scoped_connection compile error with boost 1.55.0
Construct scoped_connection directly instead of relying on copy initialization
and move constructor. Avoids the following compile error in debian jessie:
```
In file included from /usr/include/boost/signals2/signal.hpp:21:0,
from ./util.h:29,
from ./dbwrapper.h:11,
from ./txdb.h:10,
from ./test/test_bitcoin.h:11,
from qt/test/wallettests.cpp:11:
/usr/include/boost/signals2/connection.hpp: In function ‘uint256 {anonymous}::SendCoins(CWallet&, SendCoinsDialog&, const CBitcoinAddress&, CAmount)’:
/usr/include/boost/signals2/connection.hpp:234:7: error: ‘boost::signals2::scoped_connection::scoped_connection(const boost::signals2::scoped_connection&)’ is private
scoped_connection(const scoped_connection &other);
^
qt/test/wallettests.cpp:47:6: error: within this context
});
^
```
Error reported by Pavel Janík <Pavel@Janik.cz> in
https://github.com/bitcoin/bitcoin/pull/9974#issuecomment-287550034
Diffstat (limited to 'src/qt/test/wallettests.cpp')
-rw-r--r-- | src/qt/test/wallettests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index 2bb7f01fdd..118b54e8de 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -42,9 +42,9 @@ uint256 SendCoins(CWallet& wallet, SendCoinsDialog& sendCoinsDialog, const CBitc entry->findChild<QValidatedLineEdit*>("payTo")->setText(QString::fromStdString(address.ToString())); entry->findChild<BitcoinAmountField*>("payAmount")->setValue(amount); uint256 txid; - boost::signals2::scoped_connection c = wallet.NotifyTransactionChanged.connect([&txid](CWallet*, const uint256& hash, ChangeType status) { + boost::signals2::scoped_connection c(wallet.NotifyTransactionChanged.connect([&txid](CWallet*, const uint256& hash, ChangeType status) { if (status == CT_NEW) txid = hash; - }); + })); ConfirmSend(); QMetaObject::invokeMethod(&sendCoinsDialog, "on_sendButton_clicked"); return txid; |