Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
4.8.2
-
None
-
Mac OS X 10.6.8, Qt/Cocoa 4.8.2
Description
In qt_mac_handleMouseEvent (qt_cocoa_helpers_mac.mm), a final if statement handles QEvent::MouseButtonRelease events by checking to see if a delayed enter/leave event should be sent.
This invokes qt_mac_getTargetForMouseEvent, and is commented with "since the relase[sic] might have closed a window, we dont give the nativeWidget hint".
The code does pass nativeWidget to qt_mac_getTargetForMouseEvent, however as the comments say this parameter is no longer valid.
This can be seen in the case where a window contains a button, and clicking the button deletes the window. In that situation nativeWidget will be the button. But since processing the event deleted the window, the button has also been destroyed and so nativeWidget can no longer be dereferenced.
I think the comments are correct, and qt_mac_getTargetForMouseEvent should be invoked with NULL rather than nativeWidget.