Bug 449243 - 'Add to desktop' option from context menu of Kickoff does not work for KCMs
Summary: 'Add to desktop' option from context menu of Kickoff does not work for KCMs
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-01-27 12:06 UTC by Patrick Silva
Modified: 2022-02-10 19:29 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.1


Attachments
screenshot (23.94 KB, image/png)
2022-02-03 12:40 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-01-27 12:06:08 UTC
STEPS TO REPRODUCE
1. open kickoff
2. search for any app/kcm
3. right-click on the app/kcm you have searched for
4. choose 'Add to desktop'

OBSERVED RESULT
nothing happens

EXPECTED RESULT
app/kcm should be added to desktop

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-01-27 20:58:14 UTC
Broken for me in non-search view too. Console log says:

QMetaObject::invokeMethod: No such method FolderViewDropArea_QMLTYPE_57_QML_60::addLauncher(QUrl)
Candidates are:
    addLauncher(QVariant)

Seems like something got ported wrong, or else an API changed and we didn't port everything to it.
Comment 2 Alexander Lohnau 2022-01-27 21:08:15 UTC
Confirmed, found the broken code parts.

It was indeed a porting/refactoring regression ;)
Comment 3 Bug Janitor Service 2022-01-27 21:11:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1414
Comment 4 Noah Davis 2022-01-27 21:12:38 UTC
I don't have an option to "Add to desktop". Where does it come from?
Comment 5 Alexander Lohnau 2022-01-27 21:41:13 UTC
Git commit 4f285e5d0b499e8d4b058a01c6e23c2437260de5 by Alexander Lohnau.
Committed on 27/01/2022 at 21:10.
Pushed by ngraham into branch 'master'.

Fix wrong arg type in addLauncher method call

We expect a QVariant instead of a QUrl

Regression from 14d10c7a05be33f31214195369e069d40f547437

M  +1    -1    applets/kicker/plugin/containmentinterface.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/4f285e5d0b499e8d4b058a01c6e23c2437260de5
Comment 6 Nate Graham 2022-01-27 21:41:53 UTC
Git commit 3c2ad999901db5126121e34e2d9537f75e84cb4e by Nate Graham, on behalf of Alexander Lohnau.
Committed on 27/01/2022 at 21:41.
Pushed by ngraham into branch 'Plasma/5.24'.

Fix wrong arg type in addLauncher method call

We expect a QVariant instead of a QUrl

Regression from 14d10c7a05be33f31214195369e069d40f547437


(cherry picked from commit 4f285e5d0b499e8d4b058a01c6e23c2437260de5)

M  +1    -1    applets/kicker/plugin/containmentinterface.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/3c2ad999901db5126121e34e2d9537f75e84cb4e
Comment 7 Alexander Lohnau 2022-01-28 05:45:43 UTC
(In reply to Noah Davis from comment #4)
> I don't have an option to "Add to desktop". Where does it come from?

I recently fixed it not showing up, see https://bugs.kde.org/show_bug.cgi?id=448590
Comment 8 Patrick Silva 2022-02-03 12:39:28 UTC
This bug persists with KCMs.

1. search for 'mouse' KCM
2. right-click on mouse KCM and choose 'Add to desktop': nothing is added to desktop
3. repeat the previous steps: 'File already exists' dialog seen in the attached screenshot shows up
Comment 9 Patrick Silva 2022-02-03 12:40:02 UTC
Created attachment 146222 [details]
screenshot
Comment 10 Nate Graham 2022-02-03 16:07:59 UTC
Can reproduce that.
Comment 11 Alexander Lohnau 2022-02-04 20:03:56 UTC
I have a local fix, but need to test potential side effects first.

The issue is that the desktop kio slave skips these entries. If you open the desktop folder in Dolphin, the KCMs should up as one expects.
Comment 12 Bug Janitor Service 2022-02-05 09:49:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1437
Comment 13 Nate Graham 2022-02-10 19:29:03 UTC
Git commit 3e54282420d6203951b858d370297a914509e6de by Nate Graham, on behalf of Alexander Lohnau.
Committed on 10/02/2022 at 19:28.
Pushed by ngraham into branch 'master'.

Desktop: Still show services with nodisplay=true set

When adding KCMs to the desktop, we add the entry with NoDisplay=true so that it does
not show up in a search. However before this commit, that would cause the entry to
not show up on the desktop as well.

Because of the filtering in the services runner, we already make sure that only relevant
entries can get added to the desktop in the first place.
FIXED-IN: 5.24.1

M  +1    -1    kioslave/desktop/kio_desktop.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/3e54282420d6203951b858d370297a914509e6de
Comment 14 Nate Graham 2022-02-10 19:29:35 UTC
Git commit 9302030f6263df78a97273ca4364b317d9d8b4a3 by Nate Graham, on behalf of Alexander Lohnau.
Committed on 10/02/2022 at 19:29.
Pushed by ngraham into branch 'Plasma/5.24'.

Desktop: Still show services with nodisplay=true set

When adding KCMs to the desktop, we add the entry with NoDisplay=true so that it does
not show up in a search. However before this commit, that would cause the entry to
not show up on the desktop as well.

Because of the filtering in the services runner, we already make sure that only relevant
entries can get added to the desktop in the first place.
FIXED-IN: 5.24.1


(cherry picked from commit 3e54282420d6203951b858d370297a914509e6de)

M  +1    -1    kioslave/desktop/kio_desktop.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/9302030f6263df78a97273ca4364b317d9d8b4a3