<table><tr><td style="">ngraham created this revision.<br />ngraham added reviewers: Frameworks, broulik.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: kde-frameworks-devel.<br />ngraham requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13048">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p><tt style="background: #ebebeb; font-size: 13px;">KIO::iconNameForUrl()</tt> was doing a lot of redundant work on file items that <tt style="background: #ebebeb; font-size: 13px;">KFileItem::iconName()</tt> already does for us. This patchg moves most of that logic into <tt style="background: #ebebeb; font-size: 13px;">KFileItem::iconName()</tt>, which also results in fixing <a href="https://bugs.kde.org/show_bug.cgi?id=356045" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=356045</a>.</p>

<p>BUG: 356045<br />
FIXED-IN: 5.47</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Functionality testing:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Tested that adding a directory with a custom icon to the Places panel resuts in the Places panel entry inheriting its custom icon:</li>
<li class="remarkup-list-item">Used the system with this patch in place for 2 days; did not find any instances of incorrect icons</li>
</ul>

<p>Regression testing:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Tested that the trash changes its icon appropriately when adding an item to an empty trash, removing all items from the trash, and emptying the trash (testtrash test passes)</li>
<li class="remarkup-list-item">Tested that other icons on the Places panel look the same as they did before the patch</li>
</ul>

<p>Unit testing:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">No test regressions (had to fix one test to expect <tt style="background: #ebebeb; font-size: 13px;">folder</tt> instead of <tt style="background: #ebebeb; font-size: 13px;">inode-directory</tt>, which is more correct anyway (and there's no visual difference between them because <tt style="background: #ebebeb; font-size: 13px;">inode-directory</tt> is a symlink to <tt style="background: #ebebeb; font-size: 13px;">folder</tt>)</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>BRANCH</strong><div><div>iconNameForUrl (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13048">https://phabricator.kde.org/D13048</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/global.cpp<br />
src/core/kfileitem.cpp<br />
src/ioslaves/trash/tests/testtrash.cpp</div></div></div><br /><div><strong>To: </strong>ngraham, Frameworks, broulik<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>