Don't use profile generation for global config file
Instead, use a parameterized PowerDevil::GlobalSettings that will determine the correct default for your system on every startup, as opposed to just the first time when profile generation is run. There was only a single global setting requiring parameterization, namely BatteryCriticalAction. But the impact is considerable: * generateProfiles() now doesn't need canSuspendToDisk, which reduces the surface area of profile generation autotests. * We need a new GlobalDefaults::defaultBatteryCriticalAction(), so powerdevilprofiledefaults.{h,cpp} gets renamed to powerdevilsettingsdefaults.h for both global and profile defaults. * PowerDevil::Core switches from the previous settings singleton to an owned GlobalSettings object, initialized in onBackendReady(). The unused "doNotInhibitOnLidClose" config entry is dropped from PowerDevilGlobalSettings.kcfg. This commit requires a clean (re)build because the global config KCM had already generated an earl...
Please register or sign in to comment