summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdehardwaredevices.cpp
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 /tdecore/tdehw/tdehardwaredevices.cpp
parentb09eb3a1c0d68a9b4c1f0cf75b4257d67b3336ea (diff)
downloadtdelibs-3b0f07f2cdf3c5228b6d38b33fb5f2bc8fa0542d.tar.gz
tdelibs-3b0f07f2cdf3c5228b6d38b33fb5f2bc8fa0542d.zip
tdehwlib: Classify the charger as an AC adapter, not as a battery.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdecore/tdehw/tdehardwaredevices.cpp')
-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 e8b287080..45633bd9e 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);
}