Bug 453159

Summary: Unable to set custom top-level icon in Service Menu
Product: [Frameworks and Libraries] frameworks-kio Reporter: Whtyger <MetamAdeptus>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: dave, kdelibs-bugs, kfm-devel, meven29, nate, patrick.rouzet, pecunia, tdhj744ra03u, unlovable_fridge356
Priority: NOR    
Version: 5.109.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Whtyger 2022-04-28 18:29:57 UTC
SUMMARY
"Icon" parameter which is set in [Desktop Entry] section of the ServiceMenu desktop file is ignored.

STEPS TO REPRODUCE
An example of ServiceMenu with submenu:
------------------------------
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all;
Actions=Create;Check;
Icon=document-encrypted
X-KDE-Submenu=md5 sums
X-KDE-Priority=TopLevel

[Desktop Action Create]
Name=Create md5 sums
Icon=document-new-from-template
Exec=dolphin-md5-create.sh %F

[Desktop Action Check]
Name=Check md5 sums
Icon=dialog-ok-apply
Exec=dolphin-md5-check.sh %f
------------------------------

OBSERVED RESULT
Icon for the top-level entry in the menu is taken from its submenu. In the case of aforementioned desktop file the icon which is shown is "document-new-from-template.svg".

EXPECTED RESULT
Icon for the top-level entry should be "document-encrypted.svg".

SOFTWARE/OS VERSIONS
OS Version: Kubuntu 22.04
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Comment 1 Jayes 2022-05-04 05:55:02 UTC
I can confirm this for Kubuntu 22.04, also when using the backports ppa.
The menu's icon is ignored. Instead the icon for the first sub-item is shown.