Go to file
Volker Hilsheimer accc833e55 QComboBox: Prevent recursion in hidePopup
With styles that want the selected combobox item to flash, QComboBox
runs a modal event loop in hidePopup. This might result in reentrancy if
a mouseReleaseEvent is processed during the 60 ms of flashing.
Since mouseReleaseEvent calls hidePopup again, we end up reentrancy and
possibly undefined behavior which has caused crashes with Qt Creator on
macOS.

Prevent the reentrancy of hidePopup using a boolean flag. Since
QBoolBlocker (or QScopedValueRollback) cannot be used with a bit flag,
use a QScopeGuard to reset the flag reliably.

Fixes: QTBUG-105951
Change-Id: Iaa5df47b93217fc8dff621764ac4005bbc3459b7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit 2af64c4577e42fecfeab9611c15fa8526bb09988)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2022-08-27 15:51:28 +00:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Minor fixes for qt-configure-module 2022-06-27 17:55:19 +02:00
cmake Make it possible to mark a test as non-batchable 2022-08-26 14:15:24 +02:00
coin Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
config.tests Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
examples Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
LICENSES Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
mkspecs qmake: Align iOS Info.plist file with the CMake one 2022-08-25 17:28:16 +02:00
qmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
src QComboBox: Prevent recursion in hidePopup 2022-08-27 15:51:28 +00:00
tests a11y: Prevent one case of losing a11y interface when setting event child 2022-08-27 03:38:16 +00:00
util Create a driver for running batched tests on WASM 2022-08-24 19:08:58 +02:00
.cmake.conf Bump version to 6.5.0 2022-06-06 13:23:59 +03:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
conanfile.py Conan: Do not force 'qt_host_path' usage in cross-build context 2022-06-22 18:18:42 +03:00
config_help.txt Add -disable-deprecated-up-to parameter to configure script 2022-08-19 23:52:05 +02:00
configure Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.bat Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.cmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
qt_cmdline.cmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
sync.profile Remove deprecated qgl.h from sync.profile 2022-06-11 00:42:13 +02:00