From 2e7ef9566388fb3f52298a38ff2fab0be1bd3d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 8 Jan 2020 01:42:14 +0100 Subject: tdehwlib: Classify the charger as an AC adapter, not as a battery. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 3b0f07f2cdf3c5228b6d38b33fb5f2bc8fa0542d) --- tdecore/tdehw/tdehardwaredevices.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tdecore/tdehw') 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); } -- cgit v1.2.1