Bug 449859

Summary: Trash KCM has Wayland generic icon
Product: [Plasma] kde-cli-tools Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: Alexander Lohnau <alexander.lohnau>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.lohnau, nate, nicolas.fella
Priority: NOR    
Version First Reported In: 5.24.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot

Description Patrick Silva 2022-02-09 13:52:46 UTC
Created attachment 146490 [details]
screenshot

STEPS TO REPRODUCE
1. search for 'Trash' with kickoff or krunner
2. open the search result described as 'Configure trash settings'
3. 

OBSERVED RESULT
as seen in the attached screenshot, Trash KCM has Wayland generic icon 

EXPECTED RESULT
Trash icon

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Nicolas Fella 2022-02-10 13:56:11 UTC
kcmshell5 kcmtrash works fine
kcmshell5 trash works fine
kcmshell5 kcm_trash is broken
Comment 2 Nicolas Fella 2022-02-10 14:04:29 UTC
The problem is that in https://invent.kde.org/plasma/kde-cli-tools/-/blob/master/kcmshell/main.cpp#L340 metaDataFileName gives the .so file instead of the .desktop file and the plugin name (kcm_trash.so) doesn't match the desktop file name (kcmtrash.desktop)
Comment 3 Bug Janitor Service 2022-02-17 17:16:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/760
Comment 4 Alexander Lohnau 2022-02-19 17:40:54 UTC
Git commit 794b0280cbabdfc222893381e220e9ec92c526bc by Alexander Lohnau.
Committed on 19/02/2022 at 17:08.
Pushed by alex into branch 'master'.

Fix trash KCM not having any icon on wayland

The plugin id is "kcm_trash", with https://invent.kde.org/plasma/kde-cli-tools/-/blob/master/kcmshell/main.cpp#L345
we want to make sure the desktop entry is found for it.

This is what we did for other KCMs inside of Plasma too.

M  +1    -0    src/ioslaves/trash/CMakeLists.txt
A  +91   -0    src/ioslaves/trash/kcm_trash.desktop

https://invent.kde.org/frameworks/kio/commit/794b0280cbabdfc222893381e220e9ec92c526bc