Skip to content

kcmodule: Hide profile load/unload fields if battery profiles are absent

Jakob Petsovits requested to merge work/jpetso/cherry-pick-fb57e7e7 into Plasma/6.0

Profile load/unload events only make sense in the context of switching between power state profiles, which can't happen unless battery profiles are supported on the given system.

For a system with only "AC Power", let's not show the corresponding profile load/unload custom script fields in the KCM. This only leaves the idle timeout custom script, which in this case we may as well show unconditionally and take out the "Choose run conditions" button.

In the C++ backend, the code for querying Solid for batteries gets moved to the KCM constructor so that kcm.supportsBatteryProfiles is correct at QML component construction time already.

(cherry picked from commit fb57e7e7 / MR !357 (merged))

Merge request reports