From 66a70e0e86672694cfb337d4c24167579a9b780c Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Wed, 14 Sep 2022 19:43:32 +0300 Subject: [PATCH] applets/batterymonitor: Don't check for context property being null It's not needed anymore, as we use the attached property now. --- applets/batterymonitor/package/contents/ui/main.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applets/batterymonitor/package/contents/ui/main.qml b/applets/batterymonitor/package/contents/ui/main.qml index a83cb3d15..148102b00 100644 --- a/applets/batterymonitor/package/contents/ui/main.qml +++ b/applets/batterymonitor/package/contents/ui/main.qml @@ -2,6 +2,7 @@ SPDX-FileCopyrightText: 2011 Sebastian Kügler SPDX-FileCopyrightText: 2011 Viranch Mehta SPDX-FileCopyrightText: 2013-2015 Kai Uwe Broulik + SPDX-FileCopyrightText: 2021-2022 ivan tkachenko SPDX-License-Identifier: LGPL-2.0-or-later */ @@ -340,8 +341,7 @@ Item { } Plasmoid.setAction("showPercentage", i18n("Show Battery Percentage on Icon"), "format-number-percent"); Plasmoid.action("showPercentage").checkable = true; - Plasmoid.action("showPercentage").checked = Qt.binding(() => - plasmoid !== null && Plasmoid.configuration.showPercentage); + Plasmoid.action("showPercentage").checked = Qt.binding(() => Plasmoid.configuration.showPercentage); if (batterymonitor.kcmAuthorized) { Plasmoid.removeAction("configure");