Skip to content

daemon: Stop using loadAction() for retrieving unchanged actions

Jakob Petsovits requested to merge work/jpetso/loadactions-cleanup into master

Several places in the code call ActionPool::loadAction() with an invalid KConfigGroup argument, this skips the entire loading part of the function and simply returns the existing action as is.

(ActionPool::init() has already instantiated, but not "loaded", any applicable PowerDevil::Action objects.)

We can have a separate function signature for this separate task. Not having to deal with this "variant" of the function will make it easier to change the function signature of loadAction() in a later port to KConfigXT.

Following this commit, the only remaining call site for loadAction() is in PowerDevil::Core::loadProfile(), which indeed passes the correct KConfigGroup to load from.

Merge request reports

Loading