Bug 448116 - After update to frameworks 5.90, .desktop files with paths to SVG icons fail to display them
Summary: After update to frameworks 5.90, .desktop files with paths to SVG icons fail ...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.90.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords: regression
: 448883 449231 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-08 14:57 UTC by Patrick Silva
Modified: 2022-01-27 20:40 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.91


Attachments
frameworks 5.89 (14.20 KB, image/png)
2022-01-08 14:57 UTC, Patrick Silva
Details
after update to frameworks 5.90 (12.35 KB, image/png)
2022-01-08 14:57 UTC, Patrick Silva
Details
SVG icon (3.41 KB, image/svg+xml)
2022-01-10 16:57 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-01-08 14:57:31 UTC
Created attachment 145222 [details]
frameworks 5.89

STEPS TO REPRODUCE
1. download biglyBT installer for linux
https://www.biglybt.com/download/
2. install biglyBT
3. add biglyBT shortcut to desktop

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

EXPECTED RESULT
SVG icon is displayed

SOFTWARE/OS VERSIONS
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]
Name=BiglyBT
GenericName=BitTorrent Client
Exec=/home/stalker/biglybt/biglybt %U
Icon=/home/stalker/biglybt/biglybt.svg
Terminal=false
Type=Application
MimeType=x-scheme-handler/magnet;application/x-bittorrent;application/x-biglybt;x-scheme-handler/biglybt;
Categories=Application;Network;FileTransfer;P2P;GTK;Java;
StartupWMClass=BiglyBT
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

https://invent.kde.org/frameworks/kio/commit/25b470d4381aabfdeb76b9c7110c8091808c78dd
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

https://invent.kde.org/frameworks/kio/commit/672c743000d1a9a97ccf6e88f89552a744010edd
Comment 13 Nate Graham 2022-01-27 20:40:00 UTC
*** Bug 449231 has been marked as a duplicate of this bug. ***