Commit b5a061ee authored by Méven Car's avatar Méven Car
Browse files

[energy kcm] Fix Technology values

Fix incorrect value of Technology enum.
Thanks @ltoscano for the catch.
Relates to D23392

Reviewers: ngraham, ltoscano, davidedmundson

Reviewed By: davidedmundson

Subscribers: davidedmundson, alexde, plasma-devel, ltoscano

Tags: #plasma

Differential Revision:
parent 42fe072a
......@@ -28,7 +28,8 @@
BatteryModel::BatteryModel(QObject *parent) : QAbstractListModel(parent)
qmlRegisterUncreatableType<Solid::Battery>("", 1, 0, "Battery",
QStringLiteral("Use Solid::Battery"));
m_batteries = Solid::Device::listFromType(Solid::DeviceInterface::Battery);
......@@ -92,22 +92,22 @@ KCM.SimpleKCM {
function modifier_chargeState(value) {
switch(value) {
case 0: return i18n("Not charging")
case 1: return i18n("Charging")
case 2: return i18n("Discharging")
case 3: return i18n("Fully charged")
case Battery.NoCharge: return i18n("Not charging")
case Battery.Charging: return i18n("Charging")
case Battery.Discharging: return i18n("Discharging")
case Battery.FullyCharged: return i18n("Fully charged")
function modifier_technology(value) {
switch(value) {
case 0: return i18n("Unknown Technology")
case 1: return i18n("Lithium Ion")
case 2: return i18n("Lithium Polymer")
case 3: return i18n("Lithium Iron Phosphate")
case 4: return i18n("LeadAcid")
case 5: return i18n("Lead Acid")
case 6: return i18n("Nickel Metal Hydride")
case Battery.LithiumIon: return i18n("Lithium ion")
case Battery.LithiumPolymer: return i18n("Lithium polymer")
case Battery.LithiumIronPhosphate: return i18n("Lithium iron phosphate")
case Battery.LeadAcid: return i18n("Lead acid")
case Battery.NickelCadmium: return i18n("Nickel cadmium")
case Battery.NickelMetalHydride: return i18n("Nickel metal hydride")
default: return i18n("Unknown technology")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment