diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-10-13 16:39:19 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-10-18 15:29:09 +0200 |
commit | 44b7a1a37b18defcf27cee4fb5f6f8695387965d (patch) | |
tree | dd479217e7c33adbb4b50de16811934f4457c35c /src/corelib | |
parent | df359bcb703db5a8adbf14e88ba4ae0d54f0cfcd (diff) |
Don't hide dialogs before closing them
When a dialog was accepted or rejected via done(), we used to only hide
it, but as of 0246bfd40a2cc5ea9cfc035146e6dd865b334c68 we now close it.
Closing a widget results in hiding it as part of handleClose, so we
do not need to explicitly hide it before calling close(). In fact
doing so prevents the lastWindowClosed logic from checking whether
the window was visible before handling the close event, which is
documented to be a requirement for a window triggering lastWindowClosed.
We still need to hide the widget in case we don't end up closing it
ourselves, to ensure QDialog::closeEvent accepts the close. The reason
for the code in closeEvent seems a bit dubious, but that's left for
future adventures.
Change-Id: Ic32b965d495c08996c3a199bbee798df0206216c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib')
0 files changed, 0 insertions, 0 deletions