Bug 437303 - Uninstalled applications can still show up in history
Summary: Uninstalled applications can still show up in history
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (other bugs)
Version First Reported In: 5.27.80
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-18 12:34 UTC by Patrick Silva
Modified: 2026-05-29 17:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.0
Sentry Crash Report:


Attachments
screenshot (162.90 KB, image/png)
2021-05-18 12:34 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-05-18 12:34:22 UTC
Created attachment 138535 [details]
screenshot

STEPS TO REPRODUCE
1. launch a KDE app and close it (it appears in "History" section of kickoff, under "Applications")
2. uninstall the app launched in the step 1
3. see "History" section of kickoff 

OBSERVED RESULT
as we can see in the attached screenshot, uninstalled app appears
above "Applications" in History section

EXPECTED RESULT
uninstalled app should be removed from "History" section

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Nate Graham 2021-05-19 02:19:00 UTC
How did you uninstall it exactly?
Comment 2 Patrick Silva 2021-05-19 02:27:56 UTC
sudo apt remove <application>
Comment 3 Nate Graham 2021-05-19 02:47:07 UTC
Then I'm not sure how we could easily fix this without checking whether or not every application is still installed right before we show the view.
Comment 4 Patrick Silva 2021-05-19 03:01:46 UTC
History of old kickoff had a bug after uninstalling an app too.
See bug 429088.
Comment 5 Patrick Silva 2026-03-01 09:49:57 UTC
Currently the uninstalled app is replaced with an empty row in Places > History.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.6.80
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Graphics Platform: Wayland
Comment 6 Bug Janitor Service 2026-05-23 09:57:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6643
Comment 7 cwo 2026-05-27 09:33:49 UTC
Git commit 9e2d25c84e13175555c258875e00e69a5705fe44 by Christoph Wolk.
Committed on 27/05/2026 at 08:57.
Pushed by cwo into branch 'master'.

applets/kicker: invalidate stand-alone RecentUsageModel

RecentUsageModel, on types that include apps, uses a proxy model to
filter out invalid apps. When there is a change in which apps are
invalid, we need to invalidate this filter, in particular after
installing or uninstalling apps. With RecentUsageModels that are used in
a RootModel, this happens automatically as the whole RootModel is
refreshed in that situation. But when used standalone, as in Kickoff's
History view, this currently does not happen. As a consequence, an
uninstalled app will still be considered valid, but have no actual data
in the model (as its KService can no longer be accessed), so there is an
empty entry in the list (possibly with a description of "undefined",
which doesn't help much either).

Instead, we need to call the proxy model's invalidate() on KSycoca
changes. We skip this if the RecentUsageModel's parent is a RootModel,
as it happens anyway in that case, so to do it twice would be a waste.

M  +9    -0    applets/kicker/recentusagemodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/9e2d25c84e13175555c258875e00e69a5705fe44
Comment 8 cwo 2026-05-27 12:01:30 UTC
Git commit 986292860e375757fe3bd4f9cc84cf2ebe5db16a by Christoph Wolk.
Committed on 27/05/2026 at 09:39.
Pushed by cwo into branch 'Plasma/6.7'.

applets/kicker: invalidate stand-alone RecentUsageModel

RecentUsageModel, on types that include apps, uses a proxy model to
filter out invalid apps. When there is a change in which apps are
invalid, we need to invalidate this filter, in particular after
installing or uninstalling apps. With RecentUsageModels that are used in
a RootModel, this happens automatically as the whole RootModel is
refreshed in that situation. But when used standalone, as in Kickoff's
History view, this currently does not happen. As a consequence, an
uninstalled app will still be considered valid, but have no actual data
in the model (as its KService can no longer be accessed), so there is an
empty entry in the list (possibly with a description of "undefined",
which doesn't help much either).

Instead, we need to call the proxy model's invalidate() on KSycoca
changes. We skip this if the RecentUsageModel's parent is a RootModel,
as it happens anyway in that case, so to do it twice would be a waste.


(cherry picked from commit 9e2d25c84e13175555c258875e00e69a5705fe44)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>

M  +9    -0    applets/kicker/recentusagemodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/986292860e375757fe3bd4f9cc84cf2ebe5db16a