DevHeads.net

Review Request: Ensure authentication data is cached properly in Dolphin

Review request for KDE Base Apps and Peter Penz.

Description
The attached patch sets the main window on the main directory lister in DolphinView and KIO jobs in DolphinMainWindow to ensure that login data for remote protocols such as sftp, ftp are cached properly for the duration of the application. Otherwise, the end user is going to end up being unnecessarily re-prompted to enter password login information.

Please note that this patch does not address every use of KIO or KDirLister in Dolphin. There are other places in Dolphin's code where directory listers and/or jobs are used without setting the main window.

Diffs
dolphin/src/dolphinmainwindow.cpp 947db77
dolphin/src/views/dolphinview.cpp 78fd56d

Diff: <a href="http://git.reviewboard.kde.org/r/104614/diff/" title="http://git.reviewboard.kde.org/r/104614/diff/">http://git.reviewboard.kde.org/r/104614/diff/</a>

Testing

Thanks,

Dawit Alemayehu

Comments

Re: Review Request: Ensure authentication data is cached properl

By Commit Hook at 04/17/2012 - 16:22

This review has been submitted with commit ff37139bcfa02973499c753df33eba19fdc347c5 by Peter Penz to branch master.

- Commit Hook

On April 16, 2012, 1:26 p.m., Dawit Alemayehu wrote:

Re: Review Request: Ensure authentication data is cached properl

By Peter Penz at 04/16/2012 - 10:03

Thanks for the patch, I've not been aware that this caching-issue can be solved like this :-) I guess this patch has not been applied to the latest master: DolphinView does not have a dir-lister anymore (it has been moved to KFileItemModel). Anyhow: Please just let me rebase the patch myself so that I can catch all cases - I'll push the patch to master during the next days.

- Peter Penz

On April 16, 2012, 1:26 p.m., Dawit Alemayehu wrote:

Re: Review Request: Ensure authentication data is cached properl

By Dawit A at 04/17/2012 - 08:49

So long as you can guarantee an infinite recursion would occur with the KIO slave calling KDirLister and KDirLister calling back the ioslave, then I guess there is no reason why you cannot use it.

- Dawit

On April 16, 2012, 1:26 p.m., Dawit Alemayehu wrote:

Re: Review Request: Ensure authentication data is cached properl

By Peter Penz at 04/16/2012 - 17:07

Regarding the KDirLister using in the filenamesearchprotocol: The reason that I did it this way was that it should be possible to also do a search e.g. on a ftp-repository. Are there technical reasons or risks when doing it this way? I initially was unsure whether this can work at all, but it turned out to run very smooth.

- Peter

On April 16, 2012, 1:26 p.m., Dawit Alemayehu wrote:

Re: Review Request: Ensure authentication data is cached properl

By Dawit A at 04/16/2012 - 10:31

Ahh indeed. I forgot to update kde-baseapps before creating the patch. :( As far as not being aware of resolving password caching issues this was, I guess that is my failure for not informing people about such things. I will have to start blogging about such issues in the future. Anyhow, I will let you deal with it.

BTW, on a related not, is it a good idea to call KDirLister from a KIO slave as it is currently being done in src/search/filenamesearchprotocol.cpp ? After all KDirLister itself relies on KIO itself. Why not simply use QDir::entryList or QDir::entryInfoList ? Since ioslaves are run in a different process, the fact that those two functions are blocking functions won't much matter.

- Dawit

On April 16, 2012, 1:26 p.m., Dawit Alemayehu wrote: