Review Request 128016: [OS X] Prevent a crash in the IdealDockWidget's context menu

René J.V. Bertin rjvbertin at gmail.com
Wed Aug 2 11:05:25 UTC 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128016/
-----------------------------------------------------------

(Updated Aug. 2, 2017, 1:05 p.m.)


Status
------

This change has been discarded.


Review request for KDevelop.


Repository: kdevplatform


Description
-------

OS X can be capricious when instances corresponding to a widget are deleted, if the class in question uses "native" ObjC SDKs behind the scenes. Pending events can in that case be (generated and) delivered to objects that were already deleted.
According to the documentation, one should prefer to use `QObject::deleteLater()` rather than the regular, direct `delete` whether it be explicit or implicit.

I've long used a local patch that uses this approach in order to prevent a recurring crash after using the context menu of the "ideal dock widget". Somehow I never put it up for review here, apparently.


Diffs
-----

  sublime/idealdockwidget.cpp dae0ea2 

Diff: https://git.reviewboard.kde.org/r/128016/diff/


Testing
-------

Builds and permits reliable behaviour on both OS X and Linux.


Thanks,

René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170802/f7aad932/attachment.html>


More information about the KDevelop-devel mailing list