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>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%