Commit 85a57f7a authored by Gabriel de Dietrich's avatar Gabriel de Dietrich
Browse files

Wheel event widget: Harden logic an extra bit


This is quite an unlikely scenario, but not impossible.

It could be that the wheel widget is destroyed during
an update phase event. In that case, wheel_widget would
be a dangling pointer for any subsequent wheel event.
We protect against this with a QPointer.

However, that would mean that if the next wheel event
were to be an end phase event, that event would be lost.
So we go through the usual code path, except that we won't
set wheel_widget in the case of an end phase event.

Change-Id: I59a912b845dcc249e1edc60b4dc28bf308d807d9
Reviewed-by: default avatarShawn Rutledge <shawn.rutledge@theqtcompany.com>
parent 2020d2cb
No related merge requests found
Showing with 53 additions and 25 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment