diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-01-08 01:42:14 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-01-08 01:42:14 +0100 |
commit | 3b0f07f2cdf3c5228b6d38b33fb5f2bc8fa0542d (patch) | |
tree | 7b79dddd3f64deb17c866615f1931eb5fa61102e /tdecore/tdehw | |
parent | b09eb3a1c0d68a9b4c1f0cf75b4257d67b3336ea (diff) | |
download | tdelibs-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')
-rw-r--r-- | tdecore/tdehw/tdehardwaredevices.cpp | 1 |
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); } |