diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-02-20 11:31:13 +0000 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-02-20 11:36:07 +0000 |
commit | d301c99554c4767663ac1c8e8f48e63c06502650 (patch) | |
tree | 119118118297aceb53a5a2e456b19ddd9648f9c0 /src | |
parent | bdddf364c9a6f80e3bfcf45ab1ae54f9eab5811b (diff) | |
parent | 4c9db9b5874acb5db2fb9bb1eb5d549aa17f9aa8 (diff) |
Merge bitcoin-core/gui#797: test: Recognize dialog object by name
4c9db9b5874acb5db2fb9bb1eb5d549aa17f9aa8 qt, test: Recognize dialog object by name (Hennadii Stepanov)
Pull request description:
Fixes https://github.com/bitcoin-core/gui/issues/796.
ACKs for top commit:
furszy:
Code ACK 4c9db9b587
BrandonOdiwuor:
ACK 4c9db9b5874acb5db2fb9bb1eb5d549aa17f9aa8
Tree-SHA512: bd54a95d3ef77bce189c2ce279c6b3b4045bdc749e115045bfd7beda73be5a553e145eb331f454cb50374c5a9e98e73794d72d43aa1887dc42bcc585ca17d10c
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 1 | ||||
-rw-r--r-- | src/qt/test/wallettests.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 3c331c70ef..89bd35eb1b 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -406,6 +406,7 @@ void SendCoinsDialog::presentPSBT(PartiallySignedTransaction& psbtx) msgBox.setInformativeText(tr("The PSBT has been copied to the clipboard. You can also save it.")); msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard); msgBox.setDefaultButton(QMessageBox::Discard); + msgBox.setObjectName("psbt_copied_message"); switch (msgBox.exec()) { case QMessageBox::Save: { QString selectedFilter; diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index f5b86f44a6..603df0b15f 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -418,7 +418,7 @@ void TestGUIWatchOnly(interfaces::Node& node, TestChain100Setup& test) timer.setInterval(500); QObject::connect(&timer, &QTimer::timeout, [&](){ for (QWidget* widget : QApplication::topLevelWidgets()) { - if (widget->inherits("QMessageBox")) { + if (widget->inherits("QMessageBox") && widget->objectName().compare("psbt_copied_message") == 0) { QMessageBox* dialog = qobject_cast<QMessageBox*>(widget); QAbstractButton* button = dialog->button(QMessageBox::Discard); button->setEnabled(true); |