diff --git a/src/qt/test/util.cpp b/src/qt/test/util.cpp index 575f9844d..b5b90a057 100644 --- a/src/qt/test/util.cpp +++ b/src/qt/test/util.cpp @@ -1,20 +1,22 @@ #include #include #include #include #include #include #include void ConfirmMessage(QString *text, int msec) { - QTimer::singleShot(msec, [text]() { + QTimer::singleShot(msec, [text] { for (QWidget *widget : QApplication::topLevelWidgets()) { if (widget->inherits("QMessageBox")) { QMessageBox *messageBox = qobject_cast(widget); - if (text) *text = messageBox->text(); + if (text) { + *text = messageBox->text(); + } messageBox->defaultButton()->click(); } } }); }