Review Request 111273: Don't crash when dropping items in the dropdown menu that appears when hovering an arrow in the location bar (breadcrumb mode)

Commit Hook null at kde.org
Tue Jul 2 18:31:53 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111273/#review35465
-----------------------------------------------------------


This review has been submitted with commit 669ee3250d233b96bc2f2e63865b048d33215674 by Frank Reininghaus to branch master.

- Commit Hook


On June 27, 2013, 6:18 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111273/
> -----------------------------------------------------------
> 
> (Updated June 27, 2013, 6:18 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Description
> -------
> 
> First of all, note that dropping items on these dropdown menus is apparently currently not possible when using the Oxygen style, see https://bugs.kde.org/show_bug.cgi?id=310016
> 
> Dropping items on the dropdown menu that appears when hovering an arrow in the location bar may cause a crash if the "File exists" dialog appears.
> 
> The cause of the crash is that everything that is triggered by dropping anything on the menu happens inside the menu's nested event loop. However, when the "File exists" dialog appears, the menu loses focus and is probably deleted, so bad things can happen as soon as the nested event loop quits.
> 
> The fix is to make the action triggered by the drop delayed. It's a bit harder than it seems at first sight though: just making the connection to the KUrlNavigator's signal delayed with the Qt::QueuedConnection argument does not work because the QDropEvent pointer becomes dangling as soon as the drop is finished. So we have to copy the drop event, which is also a bit difficult because neither the QDropEvent nor QMimeData have a copy constructor or assignment operator. This is why I propose this solution which looks a bit too complicated at first sight - I just couldn't find an easier way to make it work.
> 
> 
> This addresses bugs 192139, 256338 and 293220.
>     http://bugs.kde.org/show_bug.cgi?id=192139
>     http://bugs.kde.org/show_bug.cgi?id=256338
>     http://bugs.kde.org/show_bug.cgi?id=293220
> 
> 
> Diffs
> -----
> 
>   dolphin/src/dolphinviewcontainer.h bc58531 
>   dolphin/src/dolphinviewcontainer.cpp 71dc5fd 
> 
> Diff: http://git.reviewboard.kde.org/r/111273/diff/
> 
> 
> Testing
> -------
> 
> No crashes any more. One problem is that the drop down menu does not disappear after the drop unless the "File exists" dialog appears, but I think that this must be fixed in KUrlNavigator. I'll have a look.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130702/3fb5590d/attachment.htm>


More information about the kfm-devel mailing list