summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2020-02-13 01:00:44 +0100
committerSlávek Banko <[email protected]>2020-02-16 10:29:50 +0100
commitb48f7462dac62db1860f2bee228fdee946601451 (patch)
tree5a3e8d4b864c60371a8cfe7b6893a0ff56106058 /kcontrol
parent920cbdb3ed92bca1e8586db61035373e5bd8a0d7 (diff)
downloadtdebase-b48f7462dac62db1860f2bee228fdee946601451.tar.gz
tdebase-b48f7462dac62db1860f2bee228fdee946601451.zip
Fix units of battery values in Device Manager.
Previously it was not clear whether the units in tdehwlib are in Wh and W or Ah and A. Now the units are always Ah and A. This is related to issue TDE/tdelibs#68. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 0215a0e7127caaf4d5725ca2237a84817f649f67)
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/hwmanager/devicepropsdlg.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kcontrol/hwmanager/devicepropsdlg.cpp b/kcontrol/hwmanager/devicepropsdlg.cpp
index 3c402cc88..409776dd5 100644
--- a/kcontrol/hwmanager/devicepropsdlg.cpp
+++ b/kcontrol/hwmanager/devicepropsdlg.cpp
@@ -532,12 +532,12 @@ void DevicePropertiesDialog::populateDeviceInformation() {
if (m_device->type() == TDEGenericDeviceType::Battery) {
TDEBatteryDevice* bdevice = static_cast<TDEBatteryDevice*>(m_device);
- base->labelCurrentBatteryEnergy->setText((bdevice->energy()<0)?i18n("<unknown>"):TQString("%1 Wh").arg(bdevice->energy()));
- base->labelMaximumBatteryEnergy->setText((bdevice->maximumEnergy()<0)?i18n("<unknown>"):TQString("%1 Wh").arg(bdevice->maximumEnergy()));
- base->labelMaximumBatteryDesignEnergy->setText((bdevice->maximumDesignEnergy()<0)?i18n("<unknown>"):TQString("%1 Wh").arg(bdevice->maximumDesignEnergy()));
+ base->labelCurrentBatteryEnergy->setText((bdevice->energy()<0)?i18n("<unknown>"):TQString("%1 Ah").arg(bdevice->energy()));
+ base->labelMaximumBatteryEnergy->setText((bdevice->maximumEnergy()<0)?i18n("<unknown>"):TQString("%1 Ah").arg(bdevice->maximumEnergy()));
+ base->labelMaximumBatteryDesignEnergy->setText((bdevice->maximumDesignEnergy()<0)?i18n("<unknown>"):TQString("%1 Ah").arg(bdevice->maximumDesignEnergy()));
base->labelMinimumBatteryVoltage->setText((bdevice->minimumVoltage()<0)?i18n("<unknown>"):TQString("%1 V").arg(bdevice->minimumVoltage()));
base->labelCurrentBatteryVoltage->setText((bdevice->voltage()<0)?i18n("<unknown>"):TQString("%1 V").arg(bdevice->voltage()));
- base->labelCurrentBatteryDischargeRate->setText((bdevice->dischargeRate()<0)?i18n("<unknown>"):TQString("%1 Wh").arg(bdevice->dischargeRate()));
+ base->labelCurrentBatteryDischargeRate->setText((bdevice->dischargeRate()<0)?i18n("<unknown>"):TQString("%1 A").arg(bdevice->dischargeRate()));
TQString batteryStatusString = i18n("Unknown");
TDEBatteryStatus::TDEBatteryStatus batteryStatus = bdevice->status();
if (batteryStatus == TDEBatteryStatus::Charging) {