Review Request: Bug 176277 - dolphin should mount umounted device, if a file is dropped upon its icon in "Places"

Frank Reininghaus frank78ac at googlemail.com
Fri Aug 31 14:52:22 BST 2012


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


Thanks for the patch, and sorry for the late reply! I think that automatic mounting of drop targets will be a big usability improvement :-)

Your patch works fine and looks good in principle, but I'm wondering if we can avoid the nested event loop. The good thing about running an event loop inside slotItemDropEvent() is that it's an easy way to wait until the mounting is finished, but nested event loops (i.e., event loops which run inside functions that are called from the application's main event loop) can lead to very strange and subtle problems (see, e.g., my fix for bug 167810, which caused a very bad regression, bug 202176). Two possible problems that I can think of right now:

1. If mounting the device fails, Dolphin might freeze forever.
2. If mounting takes a few seconds, and the user clicks the close button of the Dolphin window before the nested event loop finishes, Dolphin will crash with a possibly ugly backtrace.

But that it not obvious at all for someone who hasn't had this kind of trouble before!

To prevent these problems, one could connect the model's storageSetupDone() signal to a new slot that does the actual dropping (i.e., calls DragAndDropHelper::dropUrls()), but then we need some intermediate storage for the index and the information in the QGraphicsSceneDragDropEvent. I don't see a way to do it without this kind of complexity and ugliness at the moment :-( But I really prefer to avoid nested event loops because of the bad experience we had with them.

- Frank Reininghaus


On Aug. 18, 2012, 12:21 p.m., Emmanuel Pescosta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106072/
> -----------------------------------------------------------
> 
> (Updated Aug. 18, 2012, 12:21 p.m.)
> 
> 
> Review request for Dolphin and Frank Reininghaus.
> 
> 
> Description
> -------
> 
> Mount unmounted devices, when a file is dropped upon it in places-panel.
> 
> 
> This addresses bug 176277.
>     http://bugs.kde.org/show_bug.cgi?id=176277
> 
> 
> Diffs
> -----
> 
>   dolphin/src/panels/places/placespanel.cpp 429c539 
> 
> Diff: http://git.reviewboard.kde.org/r/106072/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Emmanuel Pescosta
> 
>

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


More information about the kfm-devel mailing list