<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/125158/">https://git.reviewboard.kde.org/r/125158/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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?</p></pre>
<br />
<p>- Frank Reininghaus</p>
<br />
<p>On September 11th, 2015, 10:50 vorm. UTC, Harald Sitter wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks.</div>
<div>By Harald Sitter.</div>
<p style="color: grey;"><i>Updated Sept. 11, 2015, 10:50 vorm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=352498">352498</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kio
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">BUG: 352498</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">maked
autotested
installed
dolphin and file open dialogs now show icons</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>autotests/kfileitemtest.h <span style="color: grey">(615324f2b45fdc90a7841bdd0c8aa7f47cdf57a2)</span></li>
<li>autotests/kfileitemtest.cpp <span style="color: grey">(5f728a411401fe3009924b66970d9ae6f12c60f2)</span></li>
<li>src/core/kfileitem.cpp <span style="color: grey">(966d8626708a8f2672f1777c873f4e27e13023d6)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/125158/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>