Bug 423612 - Trying to access 'trash settings' from krunner opens systemsettings home page instead
Summary: Trying to access 'trash settings' from krunner opens systemsettings home page...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: 5.19.2
Platform: Arch Linux Linux
: VHI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 423828 424323 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-28 10:26 UTC by Kishore Gopalakrishnan
Modified: 2020-07-17 15:18 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2020-06-28 10:26:43 UTC
SUMMARY
If we type 'trash' in krunner, it shows a result labelled 'System Settings | Trash'. If we select this item, it opens the homepage of the systemsettings application instead of the Trash settings. The Trash settings are located in Dolphin's settings, and not in the systemsettings application).

STEPS TO REPRODUCE
1. Type 'trash' in krunner
2. Select the item labelled 'System Settings | Trash'.

OBSERVED RESULT
System settings window opens at the 'home page'.

EXPECTED RESULT
Trash configuration menu which is located in Dolphin's settings should be opened.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.2
KDE Frameworks Version: 5.71.0
Qt Version: 5.15.0
Kernel Version: 5.7.6-arch1-1

ADDITIONAL INFORMATION
Can also reproduce in a KDE Neon VM.
Comment 1 Alexander Lohnau 2020-06-28 10:43:59 UTC
Can confirm on KDE Neon Unstable.
Comment 2 Alexander Lohnau 2020-06-28 10:57:38 UTC
This issue only exists when using systemsettings, it works fine with kcmshell.

https://invent.kde.org/plasma/plasma-workspace/-/commit/e67e8d6d92a1b85e85be1f8f656ff5b51bd90ace
Comment 3 Alexander Lohnau 2020-06-30 20:04:57 UTC
This is a bigger problem: If the KCM has no X-KDE-System-Settings-Parent-Category it can't be loaded.
This is the case with the other dolphin KCMs and a few others.

To try this out add:
>X-KDE-System-Settings-Parent-Category=desktopbehavior
To the KCM (/usr/share/kservices5/kcmtrash.desktop) and then run kbuildsycoca5.

Then you should be able to launch it with:
>systemsettings5 kcmtrash

The code responsible for this is located in 
systemsettings/core/MenuItem.cpp in MenuItem::descendantForModule

And in SidebarMode line 714 where the method is called null is returned if no parent is found.
Comment 4 Nate Graham 2020-06-30 20:39:46 UTC
Darn, this is no good. I guess we have two immediate options:
1. Have the openSystemSettings() function check for the presence of a X-KDE-System-Settings-Parent-Category property and open it in KCMShell if it's missing
2. Allow System Settings itself to display KCMs without the X-KDE-System-Settings-Parent-Category property

#1 Cannot be released as a hotfix in Plasma since it lives in the KDeclarative framework which is on a different release schedule (though I suppose we could ask distros to patch it into their older versions). But #2 might be a bit confusing since these KCMs don't otherwise appear in System Settings. Regardless, moving to System Settings for now. Thoughts, everyone?

Also I feel like the concept of KCMs that don't appear in System Settings itself somewhat awkward and we may want to review that, long term.
Comment 5 Bug Janitor Service 2020-07-01 04:54:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/131
Comment 6 Nate Graham 2020-07-07 21:24:37 UTC
*** Bug 423828 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2020-07-08 14:04:02 UTC
Git commit 2ebf8ab391466146a7a6ae3d4dad3e0ff0c7276d by Nate Graham, on behalf of Alexander Lohnau.
Committed on 08/07/2020 at 14:00.
Pushed by ngraham into branch 'master'.

Only open KCM in systemsettings if it can be displayed

We have to check for the presence of a X-KDE-System-Settings-Parent-Category entry when opening a KCM in systemsettings.

M  +2    -1    runners/services/servicerunner.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/2ebf8ab391466146a7a6ae3d4dad3e0ff0c7276d
Comment 8 Nate Graham 2020-07-08 14:04:33 UTC
Git commit 5bc6d83ae083632fa4eef21a03b1ef59dd9a852e by Nate Graham, on behalf of Alexander Lohnau.
Committed on 08/07/2020 at 14:04.
Pushed by ngraham into branch 'Plasma/5.19'.

Only open KCM in systemsettings if it can be displayed

We have to check for the presence of a X-KDE-System-Settings-Parent-Category entry when opening a KCM in systemsettings.


(cherry picked from commit 2ebf8ab391466146a7a6ae3d4dad3e0ff0c7276d)

M  +2    -1    runners/services/servicerunner.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/5bc6d83ae083632fa4eef21a03b1ef59dd9a852e
Comment 9 Alexander Lohnau 2020-07-13 15:47:13 UTC
Git commit aa84d6c2848f1e0ec45085160e4238a9733f6458 by Alexander Lohnau.
Committed on 10/07/2020 at 19:32.
Pushed by alex into branch 'master'.

Open trash KCM from plasmoid in KCMShell

M  +1    -1    applets/trash/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/aa84d6c2848f1e0ec45085160e4238a9733f6458
Comment 10 Nate Graham 2020-07-13 21:41:48 UTC
*** Bug 423828 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2020-07-17 15:18:46 UTC
*** Bug 424323 has been marked as a duplicate of this bug. ***