Bug 493034 - Kirigami parses system icon names from custom icon filenames
Summary: Kirigami parses system icon names from custom icon filenames
Status: CONFIRMED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords: regression
: 500786 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-12 20:32 UTC by evskof@gmail.com
Modified: 2025-04-04 14:08 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Kickoff not displaying the custom icon (70.24 KB, image/png)
2024-09-12 20:32 UTC, evskof@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description evskof@gmail.com 2024-09-12 20:32:48 UTC
Created attachment 173595 [details]
Kickoff not displaying the custom icon

SUMMARY
When browsing for a custom icon in a widget settings page, KDE parses the icon filename, and if it starts with a valid icon name, loads that generic icon instead of the custom one. This seems to be a regression in Kirigami after 6.5.0.

Doing a bisect between 6.5.0 and master resulted in https://invent.kde.org/frameworks/kirigami/-/merge_requests/1603

STEPS TO REPRODUCE
1. Rename any file to start with a valid icon name, even if it isn't a valid image file (try "dialog-error.png")
2. Right click -> Configure on (any?) widget supporting custom icons through KIconThemes, for example Kickoff
3. Choose a new icon and browse for the file you renamed earlier
4. Apply settings

OBSERVED RESULT
The loaded icon is a generic system icon instead of the custom image you intended to select.

EXPECTED RESULT
The custom icon file should be loaded regardless of its filename.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux (kdesrc-build)
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.10.9-arch1-2 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8650U CPU @ 1.90GHz
Memory: 31.2 GB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620

ADDITIONAL INFORMATION
https://bugs.kde.org/show_bug.cgi?id=491854 might be related although it seems like a slightly different issue.
Comment 1 Max 2024-09-19 09:22:01 UTC
I can confirm this, I have this launcher:

[Desktop Entry]
Name=Ассистент
Comment=Ассистент
Keywords=assistant;фыышыефте;Ассистент;fccbcntyn
Exec=/opt/assistant/scripts/assistant.sh
Terminal=false
Type=Application
Icon=/opt/assistant/share/icons/assistant.png
Categories=Network;

And in the menu it is displayed with Qt Assistant icon instead of custom icon specified. It's a regression, was working before frameworks update to 6.6

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.10.10-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 2 zharvek 2024-09-21 17:31:05 UTC
Same as Max, Custom icons read from the .desktop files are applying to the "Task Manager" but not applying to Kickoff or any other menus.

Operating System: Archlinux
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.10.8-zen1-1-zen (64-bit)
Graphics Platform: X11

Thanks.
Comment 3 Nate Graham 2024-09-25 18:47:42 UTC
Can reproduce.
Comment 4 Max 2025-02-14 07:31:07 UTC
Still present in frameworks 6.11.0
Comment 5 Nate Graham 2025-02-27 13:39:06 UTC
*** Bug 500786 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2025-03-03 21:26:20 UTC
Looks like this was fixed for https://invent.kde.org/frameworks/kirigami/-/merge_requests/1699, but that had to be reverted because it broke the ability to re-color re-colorable icons referenced by absolute path.
Comment 7 Nate Graham 2025-04-02 15:11:29 UTC Comment hidden (spam)
Comment 8 pallaswept 2025-04-02 21:11:00 UTC Comment hidden (spam)
Comment 9 Nate Graham 2025-04-03 15:57:54 UTC Comment hidden (spam)
Comment 10 Marco Martin 2025-04-04 14:08:23 UTC
this was fixed once, but it caused more problems as then recoloring wasn't working anymore