diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-11-18 15:27:40 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-11-30 08:28:10 +0000 |
commit | c996c08a2f05736c75590c4b2c3c092ba530ac53 (patch) | |
tree | 4fba2998c167c93ee922ed3dd06c48a5be5776a9 /src/libs/CMakeLists.txt | |
parent | 7017ad6419efcba05d82e6279c1d4bd1ceb96e78 (diff) |
macOS: Fix crash when quickly canceling device test dialog
and the settings dialog, by quickly pressing escape (twice) after
closing the device setup dialog.
The device test dialog was created on the stack, and run with exec(),
which creates another nested event loop for it. If the escape keys got
into the event queue before the device test dialog was shown, the first
key event was handled by the device test dialog correctly, but the
second key event was delivered to the settings dialog _within the device
test dialog's event loop_.
So, while the stack still was within DeviceSettingsWidget::testDevice()
and the dlg.exec() call, the settings dialog was rejected, and
recursively deleting children, including the device settings widget and
even worse the device test dialog - which was created on the stack. That
leads to a crash.
Move the device test dialog to the heap and use show() instead of
exec(), which fixes the issue and is the preferred method anyhow.
Fixes: QTCREATORBUG-26285
Change-Id: I03a0d1b92e466e18b753cad11482afdae2da24d0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions