mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
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
This commit is contained in:
parent
a3f0306097
commit
2c833eff3e
@ -22,7 +22,9 @@ namespace
|
|||||||
//! Press "Yes" button in modal send confirmation dialog.
|
//! Press "Yes" button in modal send confirmation dialog.
|
||||||
void ConfirmSend()
|
void ConfirmSend()
|
||||||
{
|
{
|
||||||
QTimer::singleShot(0, Qt::PreciseTimer, []() {
|
QTimer* timer = new QTimer;
|
||||||
|
timer->setSingleShot(true);
|
||||||
|
QObject::connect(timer, &QTimer::timeout, []() {
|
||||||
for (QWidget* widget : QApplication::topLevelWidgets()) {
|
for (QWidget* widget : QApplication::topLevelWidgets()) {
|
||||||
if (widget->inherits("SendConfirmationDialog")) {
|
if (widget->inherits("SendConfirmationDialog")) {
|
||||||
SendConfirmationDialog* dialog = qobject_cast<SendConfirmationDialog*>(widget);
|
SendConfirmationDialog* dialog = qobject_cast<SendConfirmationDialog*>(widget);
|
||||||
@ -32,6 +34,7 @@ void ConfirmSend()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
timer->start(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Send coins to address and return txid.
|
//! 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<QValidatedLineEdit*>("payTo")->setText(QString::fromStdString(address.ToString()));
|
||||||
entry->findChild<BitcoinAmountField*>("payAmount")->setValue(amount);
|
entry->findChild<BitcoinAmountField*>("payAmount")->setValue(amount);
|
||||||
uint256 txid;
|
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;
|
if (status == CT_NEW) txid = hash;
|
||||||
});
|
}));
|
||||||
ConfirmSend();
|
ConfirmSend();
|
||||||
QMetaObject::invokeMethod(&sendCoinsDialog, "on_sendButton_clicked");
|
QMetaObject::invokeMethod(&sendCoinsDialog, "on_sendButton_clicked");
|
||||||
return txid;
|
return txid;
|
||||||
|
Loading…
Reference in New Issue
Block a user