[SCM] plasma-workspace packaging branch, master, updated. debian/5.8.2-1-4-gae76a9e

Maximiliano Curia maxy at moszumanska.debian.org
Tue Nov 22 10:55:57 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/plasma/plasma-workspace.git;a=commitdiff;h=ae76a9e

The following commit has been merged in the master branch:
commit ae76a9e3b63cd9a6420d69d82c57d6262777072a
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date:   Tue Nov 22 11:55:50 2016 +0100

    Add new patch: Fix-Unable-to-assign-undefined-to-int-log.patch
    
    Closes: 844194
    Thanks: Helge Kreutzmann for reporting and testing this
---
 ...Fix-Unable-to-assign-undefined-to-int-log.patch | 41 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 42 insertions(+)

diff --git a/debian/patches/Fix-Unable-to-assign-undefined-to-int-log.patch b/debian/patches/Fix-Unable-to-assign-undefined-to-int-log.patch
new file mode 100644
index 0000000..1273ad0
--- /dev/null
+++ b/debian/patches/Fix-Unable-to-assign-undefined-to-int-log.patch
@@ -0,0 +1,41 @@
+From: Maximiliano Curia <maxy at gnuservers.com.ar>
+Date: Thu, 17 Nov 2016 10:01:49 +0100
+Subject: Fix "Unable to assign [undefined] to int" log
+
+The sddm breeze theme battery icon is trying to access the battery
+percent. In a batteryless system it produces the syslog message:
+Nov 14 22:28:23 samd sddm-greeter[3210]: file:///usr/share/sddm/themes/breeze/components/Battery.qml:39:18: Unable to assign [undefined] to int
+
+Based on https://gist.github.com/Zren/4e5709d842965227088f6e1d3fd42016
+
+Debian-Bug: https://bugs.debian.org/844194
+---
+ lookandfeel/contents/components/Battery.qml | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/lookandfeel/contents/components/Battery.qml b/lookandfeel/contents/components/Battery.qml
+index c4a94eb..c1bbf73 100644
+--- a/lookandfeel/contents/components/Battery.qml
++++ b/lookandfeel/contents/components/Battery.qml
+@@ -33,10 +33,19 @@ Row {
+         connectedSources: ["Battery", "AC Adapter"]
+     }
+ 
++    function getBatteryData(key, def) {
++        var value = pmSource.data.Battery[key]
++        if (typeof value === "undefined") {
++            return def;
++        } else {
++            return value;
++        }
++    }
++
+     PW.BatteryIcon {
+         id: battery
+-        hasBattery: true
+-        percent: pmSource.data["Battery"]["Percent"]
++        hasBattery: getBatteryData("Has Battery", false)
++        percent: getBatteryData("Percent", 100)
+         pluggedIn: pmSource.data["AC Adapter"] ? pmSource.data["AC Adapter"]["Plugged in"] : false
+ 
+         height: batteryLabel.height
diff --git a/debian/patches/series b/debian/patches/series
index 4cea9b1..c2f6268 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 kubuntu_startkde-qtpath.diff
 disable_incompatible_tests
+Fix-Unable-to-assign-undefined-to-int-log.patch

-- 
plasma-workspace packaging



More information about the pkg-kde-commits mailing list