diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-11-06 13:38:09 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-11-07 13:22:21 +0000 |
commit | a545b85bdd8d227c63dda07728de4d1bac285cf5 (patch) | |
tree | aff5aaa1b2ab95cc1383b8191c2df5e319a6f21c /mkspecs/common/qcc-base-qnx-aarch64le.conf | |
parent | cfbb0d2b407e45d652d18ecd940adbbc8b3ddddd (diff) |
QWidgetWindow: check if receiver is deleted after event delivery
When a popup is active, we set the receiver of mouse events to
be the active popup widget. But when we send a mouse event to
the popup, the receiver might start a new QEventLoop (e.g by
executing a new dialog). And in the meantime, the popup will
be destroyed. This will cause a crash in the line after the
event delivery (where we sat "qt_last_mouse_receiver = receiver"),
since at that point, "receiver" would be a dangling pointer.
This patch will use a QPointer instead of a raw pointer to
store "receiver", to ensure that it's set to null for
such cases.
Fixes: QTBUG-71062
Change-Id: Ie017cfa97370513ecfdd62c056fcb0e6c991f9f6
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'mkspecs/common/qcc-base-qnx-aarch64le.conf')
0 files changed, 0 insertions, 0 deletions