Review Request 125158: add logic to use icons for default xdg user dirs

Frank Reininghaus frank78ac at googlemail.com
Sat Sep 12 08:45:33 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125158/#review85235
-----------------------------------------------------------


This looks quite inefficient to me. Every time KFileItem::iconName() is called, you iterate through the QMap (by the way, you could just as well use a vector of pairs if you don't do any map lookups), create 8 temporary QStringLists by calling QStandardPaths::standardLocations(it.key()), and then iterate through each of these lists and compare localDirectory to every list item.

I think it would be much better to create a static map that maps the location strings to the icon names directly. Then you could do everything with a single lookup in the map.

I'm still not sure if I understand why the process which creates these directories cannot just add a .directory file with the desired icon name. Is there a reason why the problem can't be solved this way?

- Frank Reininghaus


On Sept. 11, 2015, 10:50 vorm., Harald Sitter wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125158/
> -----------------------------------------------------------
> 
> (Updated Sept. 11, 2015, 10:50 vorm.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Bugs: 352498
>     https://bugs.kde.org/show_bug.cgi?id=352498
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> BUG: 352498
> 
> 
> Diffs
> -----
> 
>   autotests/kfileitemtest.h 615324f2b45fdc90a7841bdd0c8aa7f47cdf57a2 
>   autotests/kfileitemtest.cpp 5f728a411401fe3009924b66970d9ae6f12c60f2 
>   src/core/kfileitem.cpp 966d8626708a8f2672f1777c873f4e27e13023d6 
> 
> Diff: https://git.reviewboard.kde.org/r/125158/diff/
> 
> 
> Testing
> -------
> 
> maked
> autotested
> installed
> dolphin and file open dialogs now show icons
> 
> 
> Thanks,
> 
> Harald Sitter
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150912/0c369c8d/attachment.html>


More information about the Kde-frameworks-devel mailing list