Tor Arne Vestbø eb8605ed2d QMessageBox: Emit accepted/rejected for native message boxes
In d8bbb5ee0e60d44a70d29306e607a59caf7fe5bc we started respecting the
button roles of buttons added to QMessageBox, by emitting accepted()
and rejected() if the appropriate roles were found.

Unfortunately this only touched the QMessageBoxPrivate::_q_buttonClicked
code path, for non-native dialogs, leaving the code path for native
dialogs in QMessageBoxPrivate::_q_clicked alone.

We now follow the same approach for the native dialogs as for the
non-native ones, by calling QMessageBoxPrivate::close() and
QMessageBoxPrivate::finalize() explicitly, instead of going
via QDialog::done(). This allows us to pass a dialog code
to finalize().

One side effect of the original change was that overriding
QDialog::done() for non-native dialogs no longer had any effect,
as we were using lower level plumbing. Since we now align with
the original change for native dialogs, we will adopt the same
limitation, but this will be fixed in a follow up for both
cases.

The callback code for custom buttons in native dialogs could also
use some alignment with the non-native path, but this is also
left for a follow up.

Fixes: QTBUG-113685
Change-Id: Iea03a0007f884d6c7f11d2bd891446bdaa5ddc67
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
(cherry picked from commit 6da1ecc8c2b9f7fd488194b6e81b41a314b678d5)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-07-31 13:22:35 +02:00
2023-05-17 14:04:48 +03:00
2020-11-16 10:02:08 +02:00
2023-07-31 10:38:57 +00:00
2015-08-18 19:59:14 +00:00
2023-06-26 07:48:34 +00:00
2023-02-07 18:51:58 +00:00
2023-02-07 18:51:58 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%