Go to file
Richard Moe Gustavsen 75c22d4598 QCocoaWindow: be more careful when flushing events
Flushing the QPA event queue is problematic since we can then end up
delivering several events to Qt (or the app) at the same time on the
call stack. This again can easily leave objects in an inconsistent
state if they receive callbacks from subsequent events while being
occupied processing the first.

This is also what happens in the listed report. A QMenu shows
a sub menu when the mouse enters a menu item. The show leads to
QPA flushing events, which in some cases also includes flushing
another pending move event. The move event is delivered to the
same QMenu, which will clear a private variable (currentAction).
When the show returns, the state of QMenu has unexpectedly
changed, which causes a crash to happen since currentAction is
null.

This patch will fix the root cause of the problem by
stopping QCocoaWindow from flushing user input events when
the call location does a flush to deliver geometry events.

Task-number: QTBUG-66093
Change-Id: Id277550b0a080ad98c81e8c30dc7098dc73723d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-02-07 16:12:53 +00:00
bin Fix macOS shadow prefix builds using pre-synced source packages 2017-11-22 07:39:45 +00:00
config.tests Merge remote-tracking branch 'origin/5.9' into 5.10 2018-01-19 09:48:10 +01:00
dist Merge remote-tracking branch 'origin/5.9' into 5.10 2018-01-19 09:48:10 +01:00
doc Merge remote-tracking branch 'origin/5.9' into 5.10 2018-01-19 09:48:10 +01:00
examples Merge remote-tracking branch 'origin/5.9' into 5.10 2018-01-29 20:49:24 +01:00
lib
mkspecs unify windows mkspecs: move angle/vulkan includes 2018-01-27 03:55:53 +00:00
qmake Merge remote-tracking branch 'origin/5.9' into 5.10 2018-01-26 10:09:06 +01:00
src QCocoaWindow: be more careful when flushing events 2018-02-07 16:12:53 +00:00
tests QString: fix comparisons to null strings in ucstricmp 2018-02-04 17:24:59 +00:00
util Merge remote-tracking branch 'origin/5.9' into 5.10 2017-12-30 12:09:53 +01:00
.gitattributes
.gitignore gitignore: don't ignore Info.plist templates for libraries 2017-11-23 07:07:48 +00:00
.qmake.conf Bump version 2017-12-20 12:05:48 +01:00
.tag
config_help.txt config_help.txt: document that some sanitize combinations are not valid 2018-01-17 18:09:41 +00:00
configure configure: dispose of which.test 2017-08-02 16:37:32 +00:00
configure.bat configure: Prefer cl.exe over clang-cl.exe 2018-01-04 21:22:42 +00:00
configure.json Export sanitizer as a global config 2017-12-18 16:20:58 +00:00
configure.pri Merge remote-tracking branch 'origin/5.9' into 5.10 2017-12-30 12:09:53 +01:00
header.BSD
header.COMM
header.FDL
header.GPL
header.GPL-EXCEPT
header.LGPL
header.LGPL3
header.LGPL3-COMM
header.LGPL-NOGPL2
header.LGPL-ONLY
INSTALL
LGPL_EXCEPTION.txt
LICENSE.FDL
LICENSE.GPL2
LICENSE.GPL3
LICENSE.GPL3-EXCEPT
LICENSE.GPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPL3
LICENSE.LGPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPLv21 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.PREVIEW.COMMERCIAL
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile Fix syncqt after commit 40fe5d43fd 2017-09-08 13:21:47 +00:00