Bug 393380 - When an app is uninstalled, its icon should be removed from favorites list immediately
Summary: When an app is uninstalled, its icon should be removed from favorites list im...
Status: REOPENED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Menu (Kicker) (show other bugs)
Version: 5.18.0
Platform: Archlinux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Alexander Lohnau
URL:
Keywords:
: 445843 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-21 22:45 UTC by Patrick Silva
Modified: 2022-10-19 11:46 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27


Attachments
screenshot showing the error message (21.87 KB, image/png)
2018-04-21 22:45 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2018-04-21 22:45:57 UTC
Created attachment 112159 [details]
screenshot showing the error message

plasma 5.12.4 on Arch Linux

add your default web browser icon to kicker favorites list
(right click your default web browser icon > "Add to favorites")
uninstall the browser: its icon remains in favorites list
when icon is clicked, I get an error: "this will start the program <path to executable> If you do not trust this program click Cancel"
restart plasma: now the icon was gone

ps: tested with chromium from Arch Linux repositories
Comment 1 Kai Uwe Broulik 2018-04-22 08:23:53 UTC
That happens with all applications, doesn't it?
Comment 2 Patrick Silva 2018-04-22 15:12:04 UTC
(In reply to Kai Uwe Broulik from comment #1)
> That happens with all applications, doesn't it?

You are right. I think that this behavior is not correct.
When an app is uninstalled, its icon should be removed from favorites list immediately. I have edited report summary.
Comment 3 Patrick Silva 2018-04-22 15:37:44 UTC
Kickoff is also affected, ancient report: bug 280949

Dashboard is also affected on my system but I did not find any related report.
Comment 4 alexkde 2018-10-27 16:39:36 UTC
I can confirm this bug at Plasma 5.14.2.
Comment 5 Alexander Lohnau 2020-07-11 19:03:21 UTC
This is still an issue.
Comment 6 medin 2021-06-19 22:20:05 UTC
Even the new launcher in 5.21.5 is affected.
Comment 7 Patrick Silva 2021-11-21 04:29:44 UTC
*** Bug 445843 has been marked as a duplicate of this bug. ***
Comment 8 Alexander Lohnau 2022-09-16 19:47:15 UTC
I will look into fixing this by using the KSycoca::databaseChanged signal.
Comment 9 Bug Janitor Service 2022-09-17 07:11:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2132
Comment 10 Alexander Lohnau 2022-09-24 05:53:02 UTC
Git commit 6853365755fa40e2199b4856e2838735a1b1add4 by Alexander Lohnau.
Committed on 24/09/2022 at 05:46.
Pushed by alex into branch 'master'.

Remove entries from favorites when desktop file was deleted

When the KSycoca database changes, we re-evaluate if our app still exists and update the internal service.
The model checks the validity of each of the entires and removes ones that became invalid.

Based on my testing it seemed like one had to type any query to make sure that the databaseChanged signal is emitted.

Test Plan:
`printf "[Desktop Entry]\nIcon=firefox\nName=DelmeFirefox\nExec=notify-send bla bla" >~/.local/share/applications/delmefirefox.desktop`
Add the entry to the favourites
`rm ~/.local/share/applications/delmefirefox.desktop`
Make sure it does not appear in the search
Make sure the favorite is removed
FIXED-IN: 5.26

M  +18   -10   applets/kicker/plugin/appentry.cpp
M  +16   -0    applets/kicker/plugin/kastatsfavoritesmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/6853365755fa40e2199b4856e2838735a1b1add4
Comment 11 Patrick Silva 2022-10-05 11:34:11 UTC
It's still reproducible on neon unstable.

1. uninstall an app present in the favorites list of Kickoff
2. open Kickoff


Result: the uninstalled app is still present in the favorites list of Kickoff
Comment 12 Fushan Wen 2022-10-05 15:01:47 UTC
Git commit 2de230ffd6f842a95c03ede081dd71941929eb38 by Fushan Wen.
Committed on 05/10/2022 at 14:59.
Pushed by fusionfuture into branch 'master'.

applets/kicker: use `removeResult` to remove item

This fixes ghost items after desktop entries were removed from the disk.
FIXED-IN: 5.27

M  +1    -3    applets/kicker/plugin/kastatsfavoritesmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/2de230ffd6f842a95c03ede081dd71941929eb38
Comment 13 Patrick Silva 2022-10-19 11:46:09 UTC
it's still reproducible on neon unstable. The icon of the uninstalled app remains in the favorites list until I do logout and login or remove it manually. Tested with KolourPaint from neon repos and Gparted from Ubuntu 22.04 repos.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.6
Graphics Platform: Wayland