Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show All 26 Lines | |||||
#include <QApplication> | #include <QApplication> | ||||
#include <QDialogButtonBox> | #include <QDialogButtonBox> | ||||
#include <QListView> | #include <QListView> | ||||
#include <QPushButton> | #include <QPushButton> | ||||
#include <QTextEdit> | #include <QTextEdit> | ||||
#include <QTimer> | #include <QTimer> | ||||
#include <QVBoxLayout> | #include <QVBoxLayout> | ||||
#include <memory> | |||||
namespace { | namespace { | ||||
//! Press "Yes" or "Cancel" buttons in modal send confirmation dialog. | //! Press "Yes" or "Cancel" buttons in modal send confirmation dialog. | ||||
void ConfirmSend(QString *text = nullptr, bool cancel = false) { | void ConfirmSend(QString *text = nullptr, bool cancel = false) { | ||||
QTimer::singleShot(0, Qt::PreciseTimer, [text, cancel]() { | QTimer::singleShot(0, Qt::PreciseTimer, [text, cancel]() { | ||||
for (QWidget *widget : QApplication::topLevelWidgets()) { | for (QWidget *widget : QApplication::topLevelWidgets()) { | ||||
if (widget->inherits("SendConfirmationDialog")) { | if (widget->inherits("SendConfirmationDialog")) { | ||||
SendConfirmationDialog *dialog = | SendConfirmationDialog *dialog = | ||||
qobject_cast<SendConfirmationDialog *>(widget); | qobject_cast<SendConfirmationDialog *>(widget); | ||||
▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines |