Bug 442522 - Nothing happens when I right-click on KCMs in the search results of Kickoff
Summary: Nothing happens when I right-click on KCMs in the search results of Kickoff
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: 5.22.90
Platform: Arch Linux Linux
: HI normal
Target Milestone: 1.0
Assignee: Alexander Lohnau
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-09-16 13:37 UTC by Patrick Silva
Modified: 2022-05-16 14:50 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-09-16 13:37:44 UTC
STEPS TO REPRODUCE
1. search for "mouse" or another kcm
2. right-click on the kcm you have searched for
3. 

OBSERVED RESULT
nothing happens

EXPECTED RESULT
the same context menu triggered on Plasma 5.22.5 containing options like Add to desktop, Add to panel, etc

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.90
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Bug Janitor Service 2021-10-05 09:13:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1091
Comment 2 Nate Graham 2021-10-05 14:19:41 UTC
Git commit d150d92e00db607ad15f7723fe3a3420821f75fc by Nate Graham, on behalf of Bharadwaj Raju.
Committed on 05/10/2021 at 14:18.
Pushed by ngraham into branch 'master'.

Fix Kickoff context menu actions for System Settings results

M  +2    -2    applets/kicker/plugin/runnermatchesmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/d150d92e00db607ad15f7723fe3a3420821f75fc
Comment 3 Nate Graham 2021-10-05 14:20:06 UTC
Git commit 165b3b0e3b354c0f8ca80b10fcc9f0d40682e98b by Nate Graham, on behalf of Bharadwaj Raju.
Committed on 05/10/2021 at 14:20.
Pushed by ngraham into branch 'Plasma/5.23'.

Fix Kickoff context menu actions for System Settings results


(cherry picked from commit d150d92e00db607ad15f7723fe3a3420821f75fc)

M  +2    -2    applets/kicker/plugin/runnermatchesmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/165b3b0e3b354c0f8ca80b10fcc9f0d40682e98b
Comment 4 Patrick Silva 2021-10-18 11:13:50 UTC
Can reproduce again on neon unstable.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 5 Nate Graham 2021-10-18 16:23:41 UTC
OK so looks like we fixed the context menu for apps but not KCMs. :/
Comment 6 Bharadwaj Raju 2021-10-18 16:43:26 UTC
Something changed elsewhere which makes the dataUrl scheme change to "" instead of "applications" as it was before, which makes the action list function return early.
Comment 7 Bharadwaj Raju 2021-10-18 16:55:37 UTC
That and KService::serviceByStorageId(dataUrl.path()) now returns an invalid KService::Ptr for KCMs
Comment 8 Bharadwaj Raju 2021-10-20 14:04:45 UTC
Okay, turns out KCMs no longer have .desktop files, and so they don't get the actions typically associated with .desktop files like adding to the panel or desktop or favorites.

For consistency's sake I suppose we could try to emulate some of those actions without .desktop files. Kickoff can already add Places to its favorites, so shouldn't be too hard to let it add KCMs too.
Comment 9 Alexander Lohnau 2021-10-20 14:13:54 UTC
Currently the KCMs still have desktop files, but that is planned to go away.

So we need compat logic to handle embedded json metadata & the desktop files.
Comment 10 Bug Janitor Service 2021-10-20 15:59:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1138
Comment 11 Alexander Lohnau 2021-10-21 07:13:26 UTC
Git commit 01a74949fa1d5b0624f8a57bd078a55e678ea213 by Alexander Lohnau.
Committed on 21/10/2021 at 07:12.
Pushed by alex into branch 'master'.

Fix context menu actions for KCMs

Needs https://invent.kde.org/plasma/systemsettings/commit/c815c7a9bc658b7d4778c3fc4ebfff9756ebb199

Currently the logic is very fragile and depends on the data being an url.
However the data of the match is an implementation detail and is in case of the KCM matches
a KPluginMetaData instance.

To avoid this issue the first url of the QueryMatch::urls() return value is checked.
This data is intended for mime-type/scheme related operations.

In the future we need an extra url for systemsettings & should consistently use the
urls of the query match. I will work on this before continuing to port the
plasma KCMs from KServiceTypeTrader.

M  +10   -2    applets/kicker/plugin/runnermatchesmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/01a74949fa1d5b0624f8a57bd078a55e678ea213
Comment 12 Patrick Silva 2021-12-01 00:35:44 UTC
Can reproduce again on neon unstable.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.3
Graphics Platform: X11
Comment 13 Nate Graham 2021-12-01 02:39:45 UTC
>:(
Comment 14 Alexander Lohnau 2021-12-01 16:47:48 UTC
Only for certain KCMs it is the case, that had to be ported because of the KCMInit stuff. 

https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/727 Will make the bug disappear again.

Because that is such a big change and the KCMInit stuff was blocking, was not able to create the MR/merge it right away.

I am working on the migration logic that is needed for the MR, then it should be mergeable today or tomorrow.
Comment 15 Nate Graham 2021-12-01 17:12:29 UTC
OK cool. Can you add the bug keyword to one of the commits in that MR?
Comment 16 Alexander Lohnau 2021-12-01 18:47:07 UTC
Will do when I have tested all the changes and solved some rebasing fun that is waiting for me locally :D
Comment 17 Patrick Silva 2022-01-15 13:29:31 UTC
On Plasma 5.24 beta I can reproduce with Touchpad KCM, but can not with other KCMs (despite now 'Add to Desktop' option is missing from the context menu) like Display Configuration, Mouse and Global Theme.

Operating System: Arch Linux
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 18 Alexander Lohnau 2022-01-15 17:26:40 UTC
>despite now 'Add to Desktop' option is missing from the context menu

That sounds like a different issue and indeed it is missing for all entries. Though when launching kicker with plasmoidviewer it works as expected.
Comment 19 Alexander Lohnau 2022-01-15 17:28:22 UTC
Git commit a5fe53762eb1fcd9e4784528e5dcdad5ff48c0f1 by Alexander Lohnau.
Committed on 15/01/2022 at 17:27.
Pushed by alex into branch 'master'.

Add missing installation of kcm_touchpad.desktop file

M  +1    -0    kcms/touchpad/kcm/CMakeLists.txt

https://invent.kde.org/plasma/plasma-desktop/commit/a5fe53762eb1fcd9e4784528e5dcdad5ff48c0f1
Comment 20 Alexander Lohnau 2022-01-15 17:28:59 UTC
Git commit b55069c3f83167d6f82873a5ba29a1567a8901ad by Alexander Lohnau.
Committed on 15/01/2022 at 17:28.
Pushed by alex into branch 'Plasma/5.24'.

Add missing installation of kcm_touchpad.desktop file


(cherry picked from commit a5fe53762eb1fcd9e4784528e5dcdad5ff48c0f1)

M  +1    -0    kcms/touchpad/kcm/CMakeLists.txt

https://invent.kde.org/plasma/plasma-desktop/commit/b55069c3f83167d6f82873a5ba29a1567a8901ad
Comment 21 Patrick Silva 2022-01-16 11:03:38 UTC
Thank you very much Alexander.
Here is my report about missing 'Add to Desktop' option: bug 448590

This bug is not completely fixed yet. I can reproduce on neon unstable with these KCMs:
boot splash screen
file associations
firewall
about this system
software update
Comment 22 Bug Janitor Service 2022-01-16 20:45:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kde-cli-tools/-/merge_requests/32
Comment 23 Arjen Hiemstra 2022-01-25 22:37:00 UTC
Git commit d6f999ecc6e7383fd9eccffcb3982a910926dde0 by Arjen Hiemstra, on behalf of Alexander Lohnau.
Committed on 20/01/2022 at 12:09.
Pushed by ltoscano into branch 'master'.

Convert KCM desktop file to JSON

To make sure we can install the desktop file as an normal application, the metadata we
want to embed as a plugin is converted to a json file and kept in-source.

Task: https://phabricator.kde.org/T14564

M  +1    -1    keditfiletype/CMakeLists.txt
D  +0    -260  keditfiletype/filetypes.desktop
M  +1    -1    keditfiletype/filetypesview.cpp
A  +99   -0    keditfiletype/kcm_filetypes.desktop
A  +259  -0    keditfiletype/kcm_filetypes.json

https://invent.kde.org/plasma/kde-cli-tools/commit/d6f999ecc6e7383fd9eccffcb3982a910926dde0
Comment 24 Nate Graham 2022-01-25 22:50:27 UTC
Git commit 244b7e86c09ecd813d62d029b15ec55aee72eeea by Nate Graham, on behalf of Alexander Lohnau.
Committed on 25/01/2022 at 22:50.
Pushed by ngraham into branch 'Plasma/5.24'.

Convert KCM desktop file to JSON

To make sure we can install the desktop file as an normal application, the metadata we
want to embed as a plugin is converted to a json file and kept in-source.

Task: https://phabricator.kde.org/T14564


(cherry picked from commit d6f999ecc6e7383fd9eccffcb3982a910926dde0)

M  +1    -1    keditfiletype/CMakeLists.txt
D  +0    -260  keditfiletype/filetypes.desktop
M  +1    -1    keditfiletype/filetypesview.cpp
A  +99   -0    keditfiletype/kcm_filetypes.desktop
A  +259  -0    keditfiletype/kcm_filetypes.json

https://invent.kde.org/plasma/kde-cli-tools/commit/244b7e86c09ecd813d62d029b15ec55aee72eeea
Comment 25 Patrick Silva 2022-03-26 14:12:09 UTC
This bug persists with these KCMs:
about this system
software update

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 26 Alexander Lohnau 2022-05-14 12:20:15 UTC
Git commit f3900593c2d3c888105a2adeb8cc922c274ded66 by Alexander Lohnau.
Committed on 09/05/2022 at 14:40.
Pushed by alex into branch 'master'.

Fix about distro KCM not being able to be pinned

M  +1    -0    Modules/about-distro/src/CMakeLists.txt
A  +35   -0    Modules/about-distro/src/kcm_about-distro.desktop

https://invent.kde.org/plasma/kinfocenter/commit/f3900593c2d3c888105a2adeb8cc922c274ded66
Comment 27 Alexander Lohnau 2022-05-14 13:36:49 UTC
Git commit 8f0cafb20c4996a72b374bf6b38980ba543c1297 by Alexander Lohnau.
Committed on 14/05/2022 at 12:20.
Pushed by alex into branch 'master'.

Fix about offline updates KCM not being able to be pinned

M  +1    -0    kcm/CMakeLists.txt
A  +43   -0    kcm/kcm_updates.desktop [TRAILING SPACE] **

The files marked with ** at the end have a problem. Either the file contains a trailing space or the file contains a call to potentially dangerous code. Please read: https://community.kde.org/Sysadmin/CommitHooks#Email_notifications for further information. Please either fix the trailing space or review the dangerous code.


https://invent.kde.org/plasma/discover/commit/8f0cafb20c4996a72b374bf6b38980ba543c1297