Skip to content

Rename PowerButtonAction enum values to Sleep and Hibernate

Thanks to @nicolasfella rebasing & merging !268 (closed) and !269 (merged), I can upload this third patch I still had left over from my long flight. Rebased, but not built & tested on the very latest master. That said, it's a fairly mechanical change so if it builds and tests pass, it shouldn't create any issues. Commit message below:


SuspendToRam is not entirely accurate anymore, because depending on user configuration, Sleep can mean SuspendToRam, HybridSuspend or SuspendThenHibernate.

Hibernate is also used around the codebase already, renaming it from SuspendToDisk improves consistency across PowerDevil.

Boolean variables are adapted in the same way. However, where checks for PowerManagement::canSuspend() are involved, we stick to the canSuspend name rather than canSleep.

There are still D-Bus methods named suspendToRam and suspendToDisk provided by the SuspendSession action. I left those untouched because I'm not sure what users are out in the wild.

Merge request reports