Review Request 114921: Make KFileItemActions the parent of the actions it creates

Commit Hook null at kde.org
Thu Jan 9 21:28:17 UTC 2014


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


This review has been submitted with commit 7a1543f82d4f4464b204eddbaa439120de0636f2 by Frank Reininghaus to branch master.

- Commit Hook


On Jan. 9, 2014, 9:26 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114921/
> -----------------------------------------------------------
> 
> (Updated Jan. 9, 2014, 9:26 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> This patch is a result of the discussion in http://lists.kde.org/?t=138687009400001&r=1&w=2
> 
> Currently, KFileItemActions makes the widget that is set with setParentWidget(QWidget*) the parent not only of any dialogs that are shown (as advertised by the API docs), but also of the created actions. Nonetheless, KFileItemActions remembers pointers to all created actions and deletes them in the destructor. This can cause problems if the widget is deleted before the KFileItemActions instance - the destructor will then try to delete dangling pointers and cause a crash.
> 
> This problem can be fixed by making KFileItemActions the parent of the actions. This also makes the code a bit simpler because the m_ownActions member is not needed any more.
> 
> In fact, this issue is the cause of crashes in Dolphin (see https://bugs.kde.org/show_bug.cgi?id=259089). I still think that we don't really have to change it in kdelibs 4.x because the problem can be worked around (https://git.reviewboard.kde.org/r/114440/ , which isn't pushed yet because it turns out that there is still another source of crashes in the problematic Dolphin use case).
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt 2868327 
>   autotests/kfileitemactionstest.cpp PRE-CREATION 
>   src/widgets/kfileitemactions.cpp eee2ebe 
>   src/widgets/kfileitemactions_p.h 9f9a701 
> 
> Diff: https://git.reviewboard.kde.org/r/114921/diff/
> 
> 
> Testing
> -------
> 
> New unit test crashes with master, and passes if the patch is applied.
> 
> Existing kio unit tests pass on my system (except for kiocore-kacltest, but I believe that the failure is unrelated to this patch).
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140109/66fa5b62/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list