[PATCH] Bugs #158932 and #161385 : remounting does not reload the view

Peter Penz peter.penz at gmx.at
Sun Sep 21 14:18:32 BST 2008


Hi Laurens,

I've added Kevin to CC (= maintainer of Solid), as I'm quite sure a simpler 
approach must be possible.

Am Thursday, 11. September 2008 11:33:36 schrieb Laurens Vanhove:
> Hi all !
>
> I've managed to find a way to fix bugs 158932 and 161385.
> To reproduce the bug : mount some volume in dolphin, unmount it (the
> view gets emptied), remount it (the view stays empty).
>
> So the problem was that the view didn't get updated when a volume was
> (re)mounted at or under the current path. My patch adds a class (used by
> DolphinView) that keeps track of solid accessibility changes. When a
> volume accessibility changes to true (=> the volume is mounted) and the
> mountpoint is a substring of the current path a signal is emitted.
> DolphinView gets this signal and reloads.
>
> I suppose the could be a simpler way to get to this result, as the
> sidebartreeview automatically updates, which means that the event
> probably gets eaten somewhere on the way to the view. But to find out
> where that happens would require some serious debugging ... and the fix
> might not be trivial either.
> Fortunately because the monitor class is simple and gets created by
> DolphinView the performance impact should be absolutely minimal :-)

First thanks for taking care of those 2 bugs!

I'd like to prevent adding a new class representing a workaround (even if the 
class is quite straight forward). When unmounting a device the view gets 
already notified that the items should disappear. I did not analyze the code 
yet (I was two weeks on vacation and got 187 Dolphin related bugs.kde.org 
mails ;-)), but I guess that KDirLister gets informed that the directory 
should get empty when the device gets unmounted (-> KDirModel and hence the 
view gets updated). In Dolphin's information panel (infosidebarpage.cpp) I 
manually connected to signals from KDirNotify (see patch 
http://websvn.kde.org/trunk/KDE/kdebase/apps/dolphin/src/infosidebarpage.cpp?r1=818005&r2=818004&pathrev=818005) 
and I guess that maybe KDirLister only misses to emit a corresponding signal 
if the device gets mounted again.

It would be great if you'd have the time to check whether this can be solved 
in a general way in KDirLister, but as KDirLister is a quite complex class I 
fully understand if you see this issue out of your scope ;-) Just let me know 
how you thank we should proceed here.

Thanks!
Peter

> I'd be gratefull if anyone would want to review (and if possible commit)
> the patch !
> And tell me if there is anything wrong ;-)
>
>
> Regards,
> Laurens

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dolphin-remount-fix.patch
Type: text/x-patch
Size: 9322 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20080921/d77d0921/attachment.bin>


More information about the kfm-devel mailing list