Bug 448116

Summary: After update to frameworks 5.90, .desktop files with paths to SVG icons fail to display them
Product: [Frameworks and Libraries] frameworks-kio Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Severity: normal CC: elman, kdelibs-bugs, l.arvanitis, nate, plasma-bugs, qydwhotmail, realnc
Priority: NOR Keywords: regression
Version: 5.90.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=448596
Latest Commit: Version Fixed In: 5.91
Attachments: frameworks 5.89
after update to frameworks 5.90
SVG icon

Description Patrick Silva 2022-01-08 14:57:31 UTC
Created attachment 145222 [details]
frameworks 5.89

1. download biglyBT installer for linux
2. install biglyBT
3. add biglyBT shortcut to desktop

SVG icon of the shortcut added to desktop is not displayed.
please see the attached screenshots.

SVG icon is displayed

Operating System: Arch Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Patrick Silva 2022-01-08 14:57:55 UTC
Created attachment 145223 [details]
after update to frameworks 5.90
Comment 2 David Edmundson 2022-01-09 21:38:00 UTC
I don't really want to download a whole app, can you show me the .desktop file.

If there is an Icon= line can you upload that.
Comment 3 Patrick Silva 2022-01-09 21:48:56 UTC
frameworks 5.90 was moved to stable repo today and now I'm unable to reproduce.
Comment 4 Patrick Silva 2022-01-10 16:57:31 UTC
Created attachment 145302 [details]
SVG icon

Nevermind. Frameworks was partially updated yesterday, the rest was updated today and the bug is back.
SVG icon attached.
Comment 5 Patrick Silva 2022-01-11 16:00:55 UTC
Contents of the .desktop file:

#!/usr/bin/env xdg-open
[Desktop Entry]
GenericName=BitTorrent Client
Exec=/home/stalker/biglybt/biglybt %U
Comment 6 Nate Graham 2022-01-13 03:06:30 UTC
I can confirm that paths to SVG files fail.

If I make a dummy desktop file with this in it, it fails:
> Icon=/home/nate/kde/usr/share/icons/breeze/categories/32/applications-games.svg

But it works if I change it to:
> Icon=applications-games

The issue won't be in plasmashell, but I don't know where to move the bug report to.
Comment 7 Fushan Wen 2022-01-15 10:03:28 UTC
The issue could be in KDirModel. Investigating...
Comment 8 Fushan Wen 2022-01-15 10:12:54 UTC
The culprit could be https://invent.kde.org/frameworks/kio/-/merge_requests/688

But in 5.89 I don't know why it works. KIconUtils::addOverlays still used `QIcon::fromTheme`.
Comment 9 Bug Janitor Service 2022-01-15 10:47:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/708
Comment 10 Patrick Silva 2022-01-21 17:31:03 UTC
*** Bug 448883 has been marked as a duplicate of this bug. ***
Comment 11 Fushan Wen 2022-01-23 09:55:37 UTC
Git commit 25b470d4381aabfdeb76b9c7110c8091808c78dd by Fushan Wen.
Committed on 23/01/2022 at 09:33.
Pushed by ahmadsamir into branch 'master'.

kdirmodel: Allow using full path for Icon in .desktop file

This allows KDirModel correctly shows the icon with a full path specified
in the .desktop file.
Related: bug 448596

M  +14   -1    src/widgets/kdirmodel.cpp

Comment 12 Fushan Wen 2022-01-23 09:56:02 UTC
Git commit 672c743000d1a9a97ccf6e88f89552a744010edd by Fushan Wen.
Committed on 23/01/2022 at 09:34.
Pushed by ahmadsamir into branch 'master'.

autotests: Add `testIcon` to kdirmodeltest

The test can validate the correct icon is used if "Icon" is specified in
the desktop file, and can fall back to "unknown" if KDirModel fails to
load the icon.
Related: bug 448596

M  +136  -0    autotests/kdirmodeltest.cpp
M  +7    -0    autotests/kdirmodeltest.h

Comment 13 Nate Graham 2022-01-27 20:40:00 UTC
*** Bug 449231 has been marked as a duplicate of this bug. ***