tdehwlib: Classify the charger as an AC adapter, not as a battery.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 3b0f07f2cd)
r14.0.x
Slávek Banko 5 years ago
parent 46640476cb
commit 2e7ef95663
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -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);
}

Loading…
Cancel
Save