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

Add PowerButtonActionModel class and use it in global config KCM

Extracted from Tomaz Canabrava's unmerged MR !66, but generalized
to allow any arbitrary combination of selectable actions.

This model is quite easily plugged into the BatteryCriticalCombo
widget in the global config KCM a.k.a. "Advanced Power Settings",
replacing the previously manually inserted option items. I left
the profile action config untouched so that the model class can
live in kcmodules/common/ as opposed to powerdevilcore directly.

PowerButtonActionModel will also come in handy once we port the
global and profile KCMs to QML.

One functional change: The "critical level" action now also allows
selecting Hybrid Sleep, which was previously unavailable.
No good reason to hide that from the user, especially now that
PowerDevil::Core handles it correctly. Hybrid suspend might even
be the best of all critical-battery suspend options for many users.
parent e7269a65
Pipeline #464899 passed with stage
in 1 minute and 56 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