diff options
author | Eric Hameleers <alien@slackware.com> | 2018-04-26 21:49:32 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-04-26 21:49:32 +0200 |
commit | ad9a5272c5d0f29a7c04e1e9a5d5f0682e7267df (patch) | |
tree | 31bfd7183da11531803c67cc8befdf426d692ef3 /kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch | |
parent | 420db96e2e402d11c0cf0b8d2b73d64a775bc882 (diff) | |
download | ktown-ad9a5272c5d0f29a7c04e1e9a5d5f0682e7267df.tar.gz ktown-ad9a5272c5d0f29a7c04e1e9a5d5f0682e7267df.tar.xz |
plasma/powerdevil: patched a regression
PowerDevil fails to configure power settings on a fresh install.
This is fixed in 5.12.5 but it was annoying enough to already
provide a patched 5.12.4 version.
Diffstat (limited to '')
-rw-r--r-- | kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch b/kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch new file mode 100644 index 0000000..165e67b --- /dev/null +++ b/kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch @@ -0,0 +1,42 @@ +From be91abe7fc8cc731b57bec4cf2c004c07b0fd79b Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik <kde@privat.broulik.de> +Date: Wed, 25 Apr 2018 10:56:16 +0200 +Subject: Ignore "migration" key for determining whether the config is empty + +Otherwise we would never generate the default power management configuration +leading to it not suspending on lid close, not handling power buttons etc etc + +CHANGELOG: Fixed bug that caused power management system to not work on a fresh install + +Reviewed-By: David Edmundson + +BUG: 391782 +FIXED-IN: 5.12.5 +--- + daemon/powerdevilcore.cpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/daemon/powerdevilcore.cpp b/daemon/powerdevilcore.cpp +index 2cf936e..53b7521 100644 +--- a/daemon/powerdevilcore.cpp ++++ b/daemon/powerdevilcore.cpp +@@ -108,9 +108,15 @@ void Core::onBackendReady() + + m_profilesConfig = KSharedConfig::openConfig("powermanagementprofilesrc", KConfig::CascadeConfig); + ++ QStringList groups = m_profilesConfig->groupList(); ++ // the "migration" key is for shortcuts migration in added by migratePre512KeyboardShortcuts ++ // and as such our configuration would never be considered empty, ignore it! ++ groups.removeOne(QStringLiteral("migration")); ++ + // Is it brand new? +- if (m_profilesConfig->groupList().isEmpty()) { ++ if (groups.isEmpty()) { + // Generate defaults ++ qCDebug(POWERDEVIL) << "Generating a default configuration"; + bool toRam = m_backend->supportedSuspendMethods() & PowerDevil::BackendInterface::ToRam; + bool toDisk = m_backend->supportedSuspendMethods() & PowerDevil::BackendInterface::ToDisk; + ProfileGenerator::generateProfiles(toRam, toDisk); +-- +cgit v0.11.2 + |