https://bugs.kde.org/show_bug.cgi?id=457965
Nate Graham <n...@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas |ma/plasma-workspace/commit/ |ma/plasma-workspace/commit/ |ffd76192f35ddc74fcd63fbe772 |f0a3a400d63939e70004e6df765 |03894b14068ad |36ce538b428c3 --- Comment #15 from Nate Graham <n...@kde.org> --- Git commit f0a3a400d63939e70004e6df76536ce538b428c3 by Nate Graham. Committed on 22/08/2022 at 16:20. Pushed by ngraham into branch 'Plasma/5.24'. applets/kicker: fix app icon loading logic to better handle relative paths ba44b69abf82b1236ffab7d8683728c142d30c52 added logic to handle apps that use an absolute path in their .desktop file to define their icon, which works. However in the process it introduced a subtle bug: if the icon is not an absolute path and it's just a normal icon name, when QFileInfo::exists() checks for the existence of that string, it will treat it as a relative file path and therefore look for it in the current working directory, which is typically the user's homedir. If it finds something, it will go down the wrong code path and end up returning a blank QIcon. This can be verified by adding a folder with the name of an app icon into ~ and restarting plasmashell; that app in Kickoff will have a blank icon. To fix this, the icon loading code now first checks whether the icon returned by m_service->icon() is actually an absolute path. If not, it skips the logic to look for it on disk and goes straight to the codepath that looks for an icon with that name in the icon theme. To minimize disk reads, it checks for absolute-file-path-ness by inspecting the string returned by m_service->icon() rather than using QFileInfo::isAbsolute(), because this is a hot code path and most icons will not have relative paths, so checking the disk for every one of them would be a waste of resources. FIXED-IN: 5.24.7 (cherry picked from commit 57d55e386a1f66390704c3a166d6c7fcc8120a7c) M +16 -3 applets/kicker/plugin/appentry.cpp https://invent.kde.org/plasma/plasma-workspace/commit/f0a3a400d63939e70004e6df76536ce538b428c3 -- You are receiving this mail because: You are watching all bug changes.