Review Request: Bugfix for Folderview bug #175191

Fredrik Höglund fredrik at kde.org
Thu Dec 4 17:51:44 CET 2008


On Saturday 29 November 2008 22:10, Jesse Zamora wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.vidsolbach.de/r/288/
> -----------------------------------------------------------
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> This patch is my feeble attempt to fix bug #175191 (https://bugs.kde.org/show_bug.cgi?id=175191). What it does is that if the user accidentally removes the folder the folderview is pointing to, it then just reverts to the home folder. Tell me what you all think about this, and please if you have any suggestions, let me know!
> 
> Xtreme Kommander

Hi Jesse,

First of all, thank's for working on the folderview applet and for tackling
this issue.

Unfortunately there are some issues with your patch.

QDir is not network transparent, so when you use it to check if the path
exists folderview is not able to show any networked or other type of
virtual file system KIO provides.

Even if QDir was network transparent, it wouldn't be a good idea to do
a synchronous call to check if a remote path exists, since it would block
the whole plasma GUI while waiting for the call to finish. This could
potentially take minutes while waiting for a network timeout.

The right way to catch this situation is to connect to the itemsDeleted()
signal in KDirLister, and check if the deleted KFileItem is the root item.

The second issue I see with the patch is a conceptual one. The folderview
applet catches errors reported by KDirLister, such as timeouts and read
errors, and displays them to the user inside the applet.
Reverting to showing the home directory when the displayed folder is
deleted is inconsistent with this behavior, and in my opinion more
confusing since it doesn't give the user any clue as to what just happened
or why.

I think this situation should be handled the same way as any other error;
in other words displaying an error message to the user explaining what
just happened.

Regards,
Fredrik



More information about the Plasma-devel mailing list