Skip to content

Commit 919aaf6

Browse files
committed
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
2 parents 3192e52 + b5bec4e commit 919aaf6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/qt/test/wallettests.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ namespace
2222
//! Press "Yes" button in modal send confirmation dialog.
2323
void ConfirmSend()
2424
{
25-
QTimer::singleShot(0, Qt::PreciseTimer, []() {
25+
QTimer* timer = new QTimer;
26+
timer->setSingleShot(true);
27+
QObject::connect(timer, &QTimer::timeout, []() {
2628
for (QWidget* widget : QApplication::topLevelWidgets()) {
2729
if (widget->inherits("SendConfirmationDialog")) {
2830
SendConfirmationDialog* dialog = qobject_cast<SendConfirmationDialog*>(widget);
@@ -32,6 +34,7 @@ void ConfirmSend()
3234
}
3335
}
3436
});
37+
timer->start(0);
3538
}
3639

3740
//! Send coins to address and return txid.
@@ -42,9 +45,9 @@ uint256 SendCoins(CWallet& wallet, SendCoinsDialog& sendCoinsDialog, const CBitc
4245
entry->findChild<QValidatedLineEdit*>("payTo")->setText(QString::fromStdString(address.ToString()));
4346
entry->findChild<BitcoinAmountField*>("payAmount")->setValue(amount);
4447
uint256 txid;
45-
boost::signals2::scoped_connection c = wallet.NotifyTransactionChanged.connect([&txid](CWallet*, const uint256& hash, ChangeType status) {
48+
boost::signals2::scoped_connection c(wallet.NotifyTransactionChanged.connect([&txid](CWallet*, const uint256& hash, ChangeType status) {
4649
if (status == CT_NEW) txid = hash;
47-
});
50+
}));
4851
ConfirmSend();
4952
QMetaObject::invokeMethod(&sendCoinsDialog, "on_sendButton_clicked");
5053
return txid;

0 commit comments

Comments
 (0)