diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-02-02 01:39:05 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-02-02 01:39:05 +0000 |
commit | fcc5224904648a8e6eb528d7603154160a20022f (patch) | |
tree | 3bfce096b38a9cea8eed13fc70c1526c456e9abd /kde-frameworks/solid/files | |
parent | 2fd57282f0262ca084e05b0f2c63fbada395d02b (diff) |
gentoo resync : 02.02.2022
Diffstat (limited to 'kde-frameworks/solid/files')
-rw-r--r-- | kde-frameworks/solid/files/solid-5.90.0-properly-round-battery-capacity.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/kde-frameworks/solid/files/solid-5.90.0-properly-round-battery-capacity.patch b/kde-frameworks/solid/files/solid-5.90.0-properly-round-battery-capacity.patch new file mode 100644 index 000000000000..77296074bfa7 --- /dev/null +++ b/kde-frameworks/solid/files/solid-5.90.0-properly-round-battery-capacity.patch @@ -0,0 +1,31 @@ +From 2f305a7134f27489203c3fd2e9ca81790f35ac3b Mon Sep 17 00:00:00 2001 +From: ivan tkachenko <me@ratijas.tk> +Date: Mon, 17 Jan 2022 02:24:44 +0300 +Subject: [PATCH] [upower] Properly round up battery's capacity + +The same rounding is already used for charge percent just few lines +above. Without it, for example, values that are close to 100% +(e.g. 99.9825%) were rounded down to 99% instead of up to 100%. + +BUG: 448372 +FIXED-IN: 5.91 +--- + src/solid/devices/backends/upower/upowerbattery.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/solid/devices/backends/upower/upowerbattery.cpp b/src/solid/devices/backends/upower/upowerbattery.cpp +index 22b25d9..055856b 100644 +--- a/src/solid/devices/backends/upower/upowerbattery.cpp ++++ b/src/solid/devices/backends/upower/upowerbattery.cpp +@@ -84,7 +84,7 @@ int Battery::chargePercent() const + + int Battery::capacity() const + { +- return m_device.data()->prop("Capacity").toDouble(); ++ return qRound(m_device.data()->prop("Capacity").toDouble()); + } + + bool Battery::isRechargeable() const +-- +GitLab + |