Skip to content
Commit 14a900a2 authored by Jakob Petsovits's avatar Jakob Petsovits
Browse files

Use KConfigXT i.e. PowerDevil::ProfileSettings in profile KCM widgets

A PowerDevil::ActionConfig now receives the profile-specific
PowerDevil::ProfileSettings object instead of a KConfigGroup.
This is exposed as profileSettings(), similar to configGroup()
before. For loading and saving, the ActionConfig will use the
various typesafe getter and setter functions of this object.

In addition, an ActionConfig must now implement an additional pair
of functions to get or set whether the action is enabled for the
current profile. This is necessary because the ActionEditWidget
now cannot simply check whether a config group exists; instead,
the action now determines its own enabled-ness based on its
knowledge of applicable config entries.

ActionEditWidget is now the owner of a ProfileSettings object.
There are three of these out there simultaneously in the
profiles KCM, one for each power management profile: "AC",
"Battery" and "LowBattery". They can coexist because classes
generated by kconfig_compiler are backed by the same KSharedConfig
for the same configuration file.
parent 9d6b348d
Pipeline #510387 passed with stage
in 1 minute and 8 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment