03d62322b2
Since showing the native popup on macOS is blocking and processes events the QComboBox might get destroyed while the popup is open. Guard against this by using QPointer and returning early (dismissing the scope guard that would otherwise reset the menu's parent, writing to freed memory). The problem is then that the native popup remains visible, as the destructor of QComboBox calls cleanupNativeCombobox which destroys the platform menu (i.e. the QCocoaMenu instance), but that doesn't dismiss() the popup. Add a call to dismiss() to the QCocoaMenu destructor to make sure that destroying the menu closes it first. Fixes: QTBUG-116155 Pick-to: 6.6 6.5 Change-Id: If0ac19796603667f4c8e80c302710dc4c9aded50 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@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 |