[Folder View] Use KDirLister's root KFileItem for LabelGenerator
ClosedPublic

Authored by broulik on Mar 28 2017, 3:18 PM.

Details

Summary

This way we can take into account UDS_DISPLAY_NAME for locations like desktop:/, trash:/, etc

Test Plan

With this patch and D5221 I now (still) get "Desktop Folder" as heading but it's now deduced from what the KIO provides rather than being hardcoded.

trash:/ is also "Trash" now, and my places:/ KIO of D4979 shows up as "Places" now.

closestItem handling for places still works, e.h. /home/foo/Pictures is "Pictures" and also "breadcrumbs" like "Pictures > Foo > Bar" still works.

While at it I changed toString to toDisplayString which strips passwords from the URLs (should probably do an additional 5.8 patch for that)

Tilde expansion was removed as the code already only operated on the resolvedUrl from the dir model, resolving the tilde happens elsewhere and still works (custom location ~/Pictures still works)

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Mar 28 2017, 3:18 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 28 2017, 3:18 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hein accepted this revision.Mar 28 2017, 3:53 PM

+1 on making a 5.8 patch

This revision is now accepted and ready to land.Mar 28 2017, 3:53 PM
This revision was automatically updated to reflect the committed changes.