summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2020-01-08 01:42:14 +0100
committerSlávek Banko <[email protected]>2020-01-08 01:42:49 +0100
commit2e7ef9566388fb3f52298a38ff2fab0be1bd3d54 (patch)
treeac1ac410b1100f756b1768e5aa49e1a04f6a4c6b /tdecore/tdehw
parent46640476cb673a9bdc6f545640b4c97ac995458b (diff)
downloadtdelibs-2e7ef9566388fb3f52298a38ff2fab0be1bd3d54.tar.gz
tdelibs-2e7ef9566388fb3f52298a38ff2fab0be1bd3d54.zip
tdehwlib: Classify the charger as an AC adapter, not as a battery.
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 3b0f07f2cdf3c5228b6d38b33fb5f2bc8fa0542d)
Diffstat (limited to 'tdecore/tdehw')
-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 8eafe96e9..9895dc6b5 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -2236,6 +2236,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);
}