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

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/61/head
Slávek Banko 5 years ago
parent b09eb3a1c0
commit 3b0f07f2cd
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

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

Loading…
Cancel
Save