summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-27 12:27:55 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-27 19:34:49 +0200
commite7bb3a8bd345d9ff73cd214a64d1ace6b002f0a3 (patch)
tree3a3093893b794042b0ceffb3697bca9d007d457d /util
parent2ed267c82015f5eab7fe65aad6553eb0d6bb338d (diff)
Fix crash if receiver destroys itself in closeEvent
We allow QWidget::closeEvent to "delete this", and verify that this works in the tst_QWidget::testDeletionInEventHandlers test function. Sadly, that test didn't reliably catch the issue introduced in 28b14b966fe8535d7a81914b70759546b694e31b, where the receiver is accessed after the delivery of QEvent::Close. Handle the QWindow event delivery explicitly so that we don't need to access the receiver after the event has been delivered. There's nothing we can do to make the test fail more reliably in CI. A QWindow deleting itself in closeEvent will still crash; perhaps we don't want to allow that anyway. Change-Id: I2b5c2d11ded71c4f22ae9862cdc459e1f93b3374 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions