Browse Source

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
0.15
Wladimir J. van der Laan 8 years ago
parent
commit
919aaf6508
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 9
      src/qt/test/wallettests.cpp

9
src/qt/test/wallettests.cpp

@ -22,7 +22,9 @@ namespace @@ -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() @@ -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 @@ -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;

Loading…
Cancel
Save