summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-09-03 18:28:00 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-04 23:09:30 +0200
commit2262744ad00524384f1ee02cdec20cf36a3b5947 (patch)
tree52c0c1f607c5c7bf42f745d0aafa374076f21481 /src/widgets/dialogs
parent673ed80fa42a77c92256388d8dff03a3c1651941 (diff)
QMessageBox: Reset clickedButton for each invocation of the dialog
When showing a messagebox that has already been show we don't want to keep around the clicked button of the previous invocation. Pick-to: 6.2 Change-Id: Ib6f6293d40ab338c550ea344094db871ccf45c46 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index e1bf141079..7b6148b1d2 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -1593,6 +1593,7 @@ void QMessageBox::showEvent(QShowEvent *e)
}
if (d->detailsButton)
addButton(d->detailsButton, QMessageBox::ActionRole);
+ d->clickedButton = nullptr;
d->detectEscapeButton();
d->updateSize();