aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test/wallettests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/test/wallettests.cpp')
-rw-r--r--src/qt/test/wallettests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp
index 118b54e8de..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.