Skip to content

KConfigXT migration for power state profiles

Jakob Petsovits requested to merge work/jpetso/kconfigxt-profiles-migration into master

This commit adds a new PowerDevil::ProfileSettings class, generated from PowerDevilProfileSettings.kcfg via KConfig compiler / KConfigXT. Only new configuration entries are introduced here, no behavior changes yet for code that still relies on older configuration.

These settings represent the same data as before, but categories and config entry naming has been cleaned up / reimagined because the existing powermanagementprofilesrc structure cannot be reused as is. KConfigXT settings classes can't check for the existence of config groups like the current hand-written KConfig code.

So we're migrating all profile configuration to powerdevilrc using the new structure, and we keep powermanagementprofilesrc in place to avoid breaking users who switch back to Plasma 5.

Includes migration tests with before & after config files, demonstrating the changes compared to Plasma 5 profile configs.

Fixes powerdevil issue #3.


I'll put the actual code changes into two follow-up MRs (!250 (merged) for porting the config UI, !251 (merged) for porting actions themselves), and then we can get rid of ProfileGenerator. Theoretically this MR can be merged independently and not break anyone's setup, it's just that it will do the migration once whenever it first runs and any interim config changes to powermanagementprofilesrc would be ignored by later code.

Also note that this is part of the larger effort from issue #23 (closed). Together with the related follow-up MRs, this is the main change to replace/succeed @tcanabrava's MR !71 (closed).

Edited by Jakob Petsovits

Merge request reports