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

Laurens Vanhove laurens at nature-helps.com
Sun Oct 5 14:01:17 BST 2008


Peter Penz schreef:
> 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
>>     
>
>   

Hi Peter !

Sorry for the long delay ... I've been quite busy the last few weeks.
I'm not surprised that you'd rather not use a hack like I made ;-)  Even 
more because it should be unneeded, the sidebar treeview somehow manages 
to do without ...

I'll see if I can find some time to find out some other solution (should 
probably suffice to connect some signals, like you said). But if someone 
else wants to try, go for it !


Regards,
Laurens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20081005/b8be0f1a/attachment.htm>


More information about the kfm-devel mailing list