[PATCH] applets/kicker: resolve non-existing files to their url
authorChristoph Wolk <cwo.kde@posteo.net>
Mon, 23 Jun 2025 20:03:27 +0000 (20:03 +0000)
committerAurélien COUDERC <coucouf@debian.org>
Mon, 21 Jul 2025 16:21:10 +0000 (18:21 +0200)
Kicker's PAStats-based favorites do some normalization to, among others,
resolve symlinked files to their resolved path to reduce duplicates.
However, if the file doesn't exist, it essentially just gives up. This
is a problem when trying to remove favorites that were deleted: while
the un-favoriting in PAStats succeeds, kicker can't remove it from its
own model because it can't identify the file by its url if it doesn't
exist. So removed favorites confusingly stick around until the next
plasmashell restart.

Instead, we take the base url in that case - as the entries already have
gone through the process, the url is their real url anyway.

BUG: 402820
FIXED-IN: 6.4.1

(cherry picked from commit da244b8764cde5509598965f24804bbaa5e0939f)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>
Gbp-Pq: Name upstream_d1896f5a_applets-kicker-resolve-non-existing-files-to-their-url.patch

applets/kicker/plugin/kastatsfavoritesmodel.cpp

index 540a10f994ee1da81bd14d0cb8ec6497b3b8240a..627df7394d3db25cc2fd3a85bb1efc33789caeb4 100644 (file)
@@ -116,6 +116,8 @@ public:
                     m_id = QUrl::fromLocalFile(file.canonicalFilePath()).toString();
                     return;
                 }
+                // if the file was deleted, take the url as-is
+                m_id = url.toString();
             }
 
             // If this is a file, we should have already covered it