[plasma/powerdevil/Plasma/6.6] applets/batterymonitor: applets/batterymonitor: omit PPD message when there's no PPD

Nate Graham <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 22c5ef982686812561eb3ee4f860c948b029f9ce by Nate Graham.
Committed on 08/08/2026 at 21:07.
Pushed by ngraham into branch 'Plasma/6.6'.

applets/batterymonitor: omit PPD message when there's no PPD


(cherry picked from commit 2dd802dd28b5869b599fd19000f83e8093804fa6)

Co-authored-by: Nate Graham <[email protected]>

M  +19   -17   applets/batterymonitor/main.qml

https://invent.kde.org/plasma/powerdevil/-/commit/22c5ef982686812561eb3ee4f860c948b029f9ce

diff --git a/applets/batterymonitor/main.qml b/applets/batterymonitor/main.qml
index 9f40043e3..61d4ab299 100644
--- a/applets/batterymonitor/main.qml
+++ b/applets/batterymonitor/main.qml
@@ -167,24 +167,26 @@ PlasmoidItem {
             parts.push(i18n("Middle-click to disable automatic sleep and screen locking"));
         }
 
-        if (powerProfilesControl.isInPerformanceProfile) {
-            if (powerProfilesControl.isHeldOnPowerProfile) {
-                parts.push(i18np("An application has requested activating Performance mode",
-                                 "%1 applications have requested activating Performance mode",
-                                 powerProfilesControl.profileHolds.length));
-            } else {
-                parts.push(i18n("System is in Performance mode; scroll to change"));
-            }
-        } else if (powerProfilesControl.isInPowersaveProfile) {
-            if (powerProfilesControl.isHeldOnPowerProfile) {
-                parts.push(i18np("An application has requested activating Power Save mode",
-                                "%1 applications have requested activating Power Save mode",
-                                powerProfilesControl.profileHolds.length));
-            } else {
-                parts.push(i18n("System is in Power Save mode; scroll to change"));
+        if (powerProfilesControl.isPowerProfileDaemonInstalled) {
+            if (powerProfilesControl.isInPerformanceProfile) {
+                if (powerProfilesControl.isHeldOnPowerProfile) {
+                    parts.push(i18np("An application has requested activating Performance mode",
+                                    "%1 applications have requested activating Performance mode",
+                                    powerProfilesControl.profileHolds.length));
+                } else {
+                    parts.push(i18n("System is in Performance mode; scroll to change"));
+                }
+            } else if (powerProfilesControl.isInPowersaveProfile) {
+                if (powerProfilesControl.isHeldOnPowerProfile) {
+                    parts.push(i18np("An application has requested activating Power Save mode",
+                                    "%1 applications have requested activating Power Save mode",
+                                    powerProfilesControl.profileHolds.length));
+                } else {
+                    parts.push(i18n("System is in Power Save mode; scroll to change"));
+                }
+            } else if (powerProfilesControl.isInBalancedProfile) {
+                parts.push(i18n("System is in Balanced Power mode; scroll to change"));
             }
-        } else if (powerProfilesControl.isInBalancedProfile) {
-            parts.push(i18n("System is in Balanced Power mode; scroll to change"));
         }
 
         return parts.join("\n");
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.