4a4283e3e9
The native dialog helper is populated with buttons based on the message box buttons, which are still represented as QAbstractButtons, either by adding custom buttons, or by turning QMessageBox::StandardButton into QAbstractButton. To ensure as little difference as possible between the native and non-native backed dialogs, we plumb the dialog helper clicks back to the corresponding QAbstractButton. We were already doing this partially for custom dialog buttons, but now we also do it for standard buttons. As the click() will plumb back to _q_buttonClicked, which calls setClickedButton to finalize the dialog, we don't need to do this explicitly anymore. For custom buttons it now means the result() of the message box will be the custom button's index, not its role, but the result in this case is documented to be an opaque value, and it's best to keep these the same for native and non-native dialogs. Pick-to: 6.5 6.6 Change-Id: I5fe3b28e4c4ed879775610103cd1b591b3353f7e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |