| Summary: | Energy Saving KCM should support non-default settings detection | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Patrick Silva <bugseforuns> |
| Component: | kcm_powerdevil | Assignee: | Jakob Petsovits <jpetso> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | jpetso, katze_942, kde, natalie_clarius, nate |
| Priority: | NOR | Keywords: | qt6 |
| Version First Reported In: | 5.90.0 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 6.0 | |
| Sentry Crash Report: | |||
|
Description
Patrick Silva
2023-12-01 16:19:19 UTC
A relevant merge request has been started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/283 *** Bug 477952 has been marked as a duplicate of this bug. *** Git commit 1fa7212e69480b8c86408c0ff0bafb268ffe40e7 by Jakob Petsovits.
Committed on 06/12/2023 at 04:02.
Pushed by jpetso into branch 'master'.
Make highlights work for non-default settings in the profiles KCM
The recent QML port didn't implement the code that was required
for this to work. Here's the fix.
Using SettingStateBinding from kcmutils adds highlights to the
components within the QML page.
In order to also make the (non-)defaultIndicator in the sidebar
list view show up, System Settings needs to be able to construct
a single KCModuleData object through the KCM's plugin factory.
We need to register both the KQuickManagedConfigModule and the
KCModuleData when declaring the plugin, so instead of
K_PLUGIN_CLASS_WITH_JSON we now use K_PLUGIN_FACTORY_WITH_JSON.
ProfilesConfigKCM.{h,cpp} requires some refactoring to use a single
KCModuleData object instead of a collection of three different ones.
Instead of the ProfilesConfigKCM class owning three data objects,
it now only constructs a single one which in turn will create and
expose the KConfigXT-generated settings classes for all profiles.
M +74 -63 kcmodule/profiles/ProfilesConfigKCM.cpp
M +34 -29 kcmodule/profiles/ProfilesConfigKCM.h
M +175 -83 kcmodule/profiles/ui/ProfileConfig.qml
https://invent.kde.org/plasma/powerdevil/-/commit/1fa7212e69480b8c86408c0ff0bafb268ffe40e7
|