diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-21 11:46:44 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-21 11:46:55 +0100 |
commit | 919aaf6508557439ab859c25dae86998a9bed12f (patch) | |
tree | 8c4e20718157d355ae98d4c6bbe976e3a093604f /src/qt/test | |
parent | 3192e5278abca7c1f3b4a2a7f77a0ce941c73985 (diff) | |
parent | b5bec4e330fc7201d989663b4dbc6a1e620dd0f9 (diff) |
Merge #10039: Fix compile errors with Qt 5.3.2 and Boost 1.55.0
b5bec4e Avoid QTimer::singleShot compile error with Qt 5.3.2 (Russell Yanofsky)
d5046e7 Avoid scoped_connection compile error with boost 1.55.0 (Russell Yanofsky)
Tree-SHA512: 96362b872817681b062e05c8fcb76cfc23b6e87e0371584a6aae0e17535fd34ccdba922380aa4b669a8e75ef3f9fadd25061541f77cb3198173f04249a7bcd62
Diffstat (limited to 'src/qt/test')
-rw-r--r-- | src/qt/test/wallettests.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index 2bb7f01fdd..36d93361dd 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -22,7 +22,9 @@ namespace //! Press "Yes" button in modal send confirmation dialog. void ConfirmSend() { - QTimer::singleShot(0, Qt::PreciseTimer, []() { + QTimer* timer = new QTimer; + timer->setSingleShot(true); + QObject::connect(timer, &QTimer::timeout, []() { for (QWidget* widget : QApplication::topLevelWidgets()) { if (widget->inherits("SendConfirmationDialog")) { SendConfirmationDialog* dialog = qobject_cast<SendConfirmationDialog*>(widget); @@ -32,6 +34,7 @@ void ConfirmSend() } } }); + timer->start(0); } //! Send coins to address and return txid. @@ -42,9 +45,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; |