Fix a bug in the new version of the patch

epel9
Adam Williamson 1 year ago
parent f57b678068
commit 62825569db

@ -1,4 +1,4 @@
From a1a3ae586cf1e10eec6930f088a5ad72631d22fd Mon Sep 17 00:00:00 2001
From 795ac6b8b40cd882235adeed4c83356d1ca79f61 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Fri, 1 Sep 2023 17:09:16 -0700
Subject: [PATCH] profiledefaults: don't automatically suspend by default if
@ -13,10 +13,10 @@ Signed-off-by: Adam Williamson <awilliam@redhat.com>
daemon/powerdevilcore.cpp | 4 +++-
daemon/powerdevilpowermanagement.cpp | 17 +++++++++++++++++
daemon/powerdevilpowermanagement.h | 1 +
daemon/powerdevilprofilegenerator.cpp | 15 +++++++++------
daemon/powerdevilprofilegenerator.cpp | 17 ++++++++++-------
daemon/powerdevilprofilegenerator.h | 2 +-
kcmodule/profiles/EditPage.cpp | 2 ++
6 files changed, 33 insertions(+), 8 deletions(-)
6 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/daemon/powerdevilcore.cpp b/daemon/powerdevilcore.cpp
index 0791552c..5c4f8a7d 100644
@ -89,7 +89,7 @@ index 84c99f19..14069708 100644
bool canHibernate() const;
bool canHybridSuspend() const;
diff --git a/daemon/powerdevilprofilegenerator.cpp b/daemon/powerdevilprofilegenerator.cpp
index b3029e02..f6a5f3eb 100644
index b3029e02..475b9ed6 100644
--- a/daemon/powerdevilprofilegenerator.cpp
+++ b/daemon/powerdevilprofilegenerator.cpp
@@ -29,7 +29,7 @@
@ -101,7 +101,15 @@ index b3029e02..f6a5f3eb 100644
{
// Change critical action if default (hibernate) is unavailable
if (!toDisk) {
@@ -71,7 +71,10 @@ void ProfileGenerator::generateProfiles(bool mobile, bool toRam, bool toDisk)
@@ -64,14 +64,17 @@ void ProfileGenerator::generateProfiles(bool mobile, bool toRam, bool toDisk)
dimDisplay.writeEntry< int >("idleTime", 300000);
}
- auto initLid = [toRam, mobile](KConfigGroup &profile)
+ auto initLid = [vm, toRam, mobile](KConfigGroup &profile)
{
const Modes defaultPowerButtonAction = mobile ? ToggleScreenOnOffMode : LogoutDialogMode;
KConfigGroup handleButtonEvents(&profile, "HandleButtonEvents");
handleButtonEvents.writeEntry< uint >("powerButtonAction", defaultPowerButtonAction);
handleButtonEvents.writeEntry< uint >("powerDownAction", LogoutDialogMode);

Loading…
Cancel
Save