Split out BackendSettings from PowerDevilSettings
Moving into the next phase of migrating to KConfigXT, see issue #23 (closed) for related MRs. The first bunch of MR was refactoring without behavior changes (plus a QML port of the global config KCM on the side).
This second phase is now actually changing config data. I've mostly got the full profiles migration branch written, but it'll be a simpler MR if global settings aren't part of generateProfiles()
anymore. That, in turn, is simpler if backend-specific settings don't depend on PowerDevilSettings
to be a singleton. Hence this MR. More details in the commit message pasted below.
Commit 1: Split out BackendSettings from PowerDevilSettings
PowerDevilSettings
includes brightness animation duration and
threshold settings, which are used in PowerDevilUPowerBackend
.
Those settings are not exposed via KCM, but could have been
manually set by the user in the powerdevilrc config file.
In a later commit, we want to parameterize the global settings
object and stop relying on profile generation. But the backend
isn't supposed to have full knowledge of parameterization flags
that's available to PowerDevil::Core
.
This commit migrates the backend-specific brightness settings
(if any were set at all) to a different config file that the backend
can use all by itself, the same kind of singleton config object.
This gives us flexibility to change PowerDevilSettings
for sole use
in PowerDevil::Core
and the global config KCM later on.
Since we're already migrating config entries, this commit also
cleans up the "General" config group. The doNotInhibitOnLidClose
setting is unused and gets removed, while pausePlayersOnSuspend
is is now called PauseMediaPlayersOnSuspend
as a first move to
consistently capitalize config entries.
Commit 2: Add tests for config file migration
We start with testing global/backend config migrations, but KConfigXT-related profile/activity migrations will soon follow.