summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-01-08 01:42:14 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-01-08 01:42:14 +0100
commit3b0f07f2cdf3c5228b6d38b33fb5f2bc8fa0542d (patch)
tree7b79dddd3f64deb17c866615f1931eb5fa61102e
parentb09eb3a1c0d68a9b4c1f0cf75b4257d67b3336ea (diff)
downloadtdelibs-3b0f07f2.zip
tdelibs-3b0f07f2.tar.gz
tdehwlib: Classify the charger as an AC adapter, not as a battery.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index e8b2870..45633bd 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -2269,6 +2269,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (devicesubsystem == "power_supply") {
TQString powersupplyname(udev_device_get_property_value(dev, "POWER_SUPPLY_NAME"));
if ((devicedriver == "ac")
+ || (devicedriver.contains("charger"))
|| (powersupplyname.upper().startsWith("AC"))) {
if (!device) device = new TDEMainsPowerDevice(TDEGenericDeviceType::PowerSupply);
}