Summary: | Folder View widget shows .desktop files' filenames instead of desktop entry's Name property when using user-specified path | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Alexander Wilms <f.alexander.wilms> |
Component: | Folder | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | CONFIRMED --- | ||
Severity: | minor | CC: | hein, nate, olib141 |
Priority: | NOR | ||
Version: | 5.25.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Alexander Wilms
2022-08-27 19:17:53 UTC
Found the line of code which would need to be changed: https://invent.kde.org/plasma/plasma-desktop/-/blob/master/containments/desktop/package/contents/ui/ConfigLocation.qml#L167 Nice, wanna fix it? I'm trying, but I don't know how to get a relative path from two absolute paths: Apparently, the QDir type is not available in QML and in Javascript it's usually done with a NodeJS module. function getDesktopURI(fileURI) { var absoluteDesktopURI = StandardPaths.writableLocation(StandardPaths.DesktopLocation) // var relativeURI = absoluteDesktopURI.relativeFilePath(fileURI) <- QDir method // var desktopURI = relativeURI.replace("file://","desktop://") console.log(fileURI) console.log(absoluteDesktopURI) // console.log(relativeURI) // var path = require('path') <- NodeJS module // console.log(path.relative('/foo/bar/baz', '/foo')) return fileURI } I submitted a merge request: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1125 I didn't test it in a Plasma session, but the unit test passes. *** Bug 459077 has been marked as a duplicate of this bug. *** |