[Folder View] Use KIO::iconNameForUrl
AbandonedPublic

Authored by broulik on Mar 27 2017, 4:32 PM.

Details

Reviewers
markg
hein
dfaure
Group Reviewers
Plasma
Summary

In contrast to KFileItem it also has special fallback mechanisms, such as using the protocol icon, if none cound be determined.
This way my places:/ KIO will use the proper icon and also trash:/ will at least show a trash can, even if it doesn't (yet) reflect the actual trash state.

Test Plan

/home/foo/Desktop: before *folder*, now *desktop* (QStandardPaths special logic)
/home/foo/Pictures: before *images*, now *images*
places:/ before *folder*, now *bookmarks icon* defined in protocol file
trash:/ before *folder*, now *trash icon* defined in protocol file

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Mar 27 2017, 4:32 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 27 2017, 4:32 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
markg accepted this revision.Mar 27 2017, 5:00 PM
markg added a subscriber: markg.

Fancy!
I learned something new, thank you :)

This revision is now accepted and ready to land.Mar 27 2017, 5:00 PM
hein edited edge metadata.Mar 28 2017, 8:41 AM

Couldn't we instead make KFileItem use this somehow? It strikes me as odd that two codepaths in KIO lead to different results. If we can't, we should at least KFileItem APIDOX to point to the other method and explaining when to use which.

broulik abandoned this revision.Dec 21 2017, 1:05 PM

I'll look into fixing KFileItem