D13048: Move redundant logic in KIO::iconNameForUrl() into KFileItem::iconName()
Nathaniel Graham
noreply at phabricator.kde.org
Tue May 22 23:14:30 UTC 2018
ngraham created this revision.
ngraham added reviewers: Frameworks, broulik.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: kde-frameworks-devel.
ngraham requested review of this revision.
REVISION SUMMARY
`KIO::iconNameForUrl()` was doing a lot of redundant work on file items that `KFileItem::iconName()` already does for us. This patchg moves most of that logic into `KFileItem::iconName()`, which also results in fixing https://bugs.kde.org/show_bug.cgi?id=356045.
BUG: 356045
FIXED-IN: 5.47
TEST PLAN
Functionality testing:
- Tested that adding a directory with a custom icon to the Places panel resuts in the Places panel entry inheriting its custom icon:
- Used the system with this patch in place for 2 days; did not find any instances of incorrect icons
Regression testing:
- 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)
- Tested that other icons on the Places panel look the same as they did before the patch
Unit testing:
- No test regressions (had to fix one test to expect `folder` instead of `inode-directory`, which is more correct anyway (and there's no visual difference between them because `inode-directory` is a symlink to `folder`)
REPOSITORY
R241 KIO
BRANCH
iconNameForUrl (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D13048
AFFECTED FILES
src/core/global.cpp
src/core/kfileitem.cpp
src/ioslaves/trash/tests/testtrash.cpp
To: ngraham, #frameworks, broulik
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180522/38cdaed7/attachment.html>
More information about the Kde-frameworks-devel
mailing list