diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-02 11:58:19 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-02 11:58:41 +0200 |
commit | 2b477e6aa1963e69c3ec9234cdc348264e91fc03 (patch) | |
tree | e2ad8cee9448ec0d5187a471c2b5c6648286e5e6 /src/qt/test | |
parent | fbf36cae3a4613e289cec6c5eaeb1395d362a037 (diff) | |
parent | e9a64615c8e18692a775765787f404266767260b (diff) |
Merge #10098: Make qt wallet test compatible with qt4
e9a6461 Make qt wallet test compatible with qt4 (Russell Yanofsky)
Tree-SHA512: a3e4598986cb3c5c20aaa1d440abc886d84fcc69a6ee4079787cfc8e3a2dce655060ff95612cb15ce8b5a9b8911e4afe2281345b59a4353ec32edf3771338381
Diffstat (limited to 'src/qt/test')
-rw-r--r-- | src/qt/test/wallettests.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index 36d93361dd..b7c1e4c4d5 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -1,6 +1,7 @@ #include "wallettests.h" #include "qt/bitcoinamountfield.h" +#include "qt/callback.h" #include "qt/optionsmodel.h" #include "qt/platformstyle.h" #include "qt/qvalidatedlineedit.h" @@ -22,9 +23,7 @@ namespace //! Press "Yes" button in modal send confirmation dialog. void ConfirmSend() { - QTimer* timer = new QTimer; - timer->setSingleShot(true); - QObject::connect(timer, &QTimer::timeout, []() { + QTimer::singleShot(0, makeCallback([](Callback* callback) { for (QWidget* widget : QApplication::topLevelWidgets()) { if (widget->inherits("SendConfirmationDialog")) { SendConfirmationDialog* dialog = qobject_cast<SendConfirmationDialog*>(widget); @@ -33,8 +32,8 @@ void ConfirmSend() button->click(); } } - }); - timer->start(0); + delete callback; + }), SLOT(call())); } //! Send coins to address and return txid. |