From 39d55877d96684c3da011343724f3b7440313bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 18 Feb 2022 06:22:28 +0100 Subject: [PATCH] Fix typos --- keba/integrationpluginkeba.cpp | 1 - keba/kebaproductinfo.cpp | 34 +++++++++++++++++----------------- keba/kebaproductinfo.h | 20 ++++++++++---------- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/keba/integrationpluginkeba.cpp b/keba/integrationpluginkeba.cpp index 52478b38..07ff9096 100644 --- a/keba/integrationpluginkeba.cpp +++ b/keba/integrationpluginkeba.cpp @@ -211,7 +211,6 @@ void IntegrationPluginKeba::setupThing(ThingSetupInfo *info) } } - m_kebaDevices.insert(thing->id(), keba); info->finish(Thing::ThingErrorNoError); qCDebug(dcKeba()) << "Setup finsihed successfully for" << thing << thing->params(); diff --git a/keba/kebaproductinfo.cpp b/keba/kebaproductinfo.cpp index c70dad40..2a5daf26 100644 --- a/keba/kebaproductinfo.cpp +++ b/keba/kebaproductinfo.cpp @@ -52,8 +52,8 @@ KebaProductInfo::KebaProductInfo(const QString &productString) : m_connector = ConnectorSocket; qCDebug(dcKeba()) << "Connector: Socket"; } else if (connectorValue.toLower() == QChar('c')) { - m_connector = ConnectorCabel; - qCDebug(dcKeba()) << "Connector: Cabel"; + m_connector = ConnectorCable; + qCDebug(dcKeba()) << "Connector: Cable"; } else { m_isValid = false; return; @@ -89,19 +89,19 @@ KebaProductInfo::KebaProductInfo(const QString &productString) : qCDebug(dcKeba()) << "Current:" << m_current; - QString cabelValue = m_productString.mid(11, 2); - if (cabelValue == "00") { - m_cabel = NoCabel; - qCDebug(dcKeba()) << "Cabel: No cabel"; - } else if (cabelValue == "01") { - m_cabel = Cabel4m; - qCDebug(dcKeba()) << "Cabel: 4 meter"; - } else if (cabelValue == "04") { - m_cabel = Cabel6m; - qCDebug(dcKeba()) << "Cabel: 6 meter"; - } else if (cabelValue == "07") { - m_cabel = Cabel5p5m; - qCDebug(dcKeba()) << "Cabel: 5.5 meter"; + QString cableValue = m_productString.mid(11, 2); + if (cableValue == "00") { + m_cable = NoCable; + qCDebug(dcKeba()) << "Cable: No cable"; + } else if (cableValue == "01") { + m_cable = Cable4m; + qCDebug(dcKeba()) << "Cable: 4 meter"; + } else if (cableValue == "04") { + m_cable = Cable6m; + qCDebug(dcKeba()) << "Cable: 6 meter"; + } else if (cableValue == "07") { + m_cable = Cable5p5m; + qCDebug(dcKeba()) << "Cable: 5.5 meter"; } else { m_isValid = false; return; @@ -223,9 +223,9 @@ KebaProductInfo::ConnectorCurrent KebaProductInfo::current() const return m_current; } -KebaProductInfo::Cabel KebaProductInfo::cabel() const +KebaProductInfo::Cable KebaProductInfo::cable() const { - return m_cabel; + return m_cable; } KebaProductInfo::Series KebaProductInfo::series() const diff --git a/keba/kebaproductinfo.h b/keba/kebaproductinfo.h index 77dd7bdd..fd40eb0c 100644 --- a/keba/kebaproductinfo.h +++ b/keba/kebaproductinfo.h @@ -40,7 +40,7 @@ class KebaProductInfo public: enum Connector { ConnectorSocket, - ConnectorCabel + ConnectorCable }; Q_ENUM(Connector) @@ -59,13 +59,13 @@ public: }; Q_ENUM(ConnectorCurrent) - enum Cabel { - NoCabel = 0, - Cabel4m = 1, - Cabel6m = 4, - Cabel5p5m = 7 + enum Cable { + NoCable = 0, + Cable4m = 1, + Cable6m = 4, + Cable5p5m = 7 }; - Q_ENUM(Cabel) + Q_ENUM(Cable) enum Series { SeriesE, @@ -104,10 +104,10 @@ public: // Porperties in the string QString model() const; // KC-P30 QString countryCode() const; // E - Connector connector() const; // Socket / Cabel + Connector connector() const; // Socket / Cable ConnectorType connectorType() const; // Type 1 / Type 2 ConnectorCurrent current() const; // 13A, 16A ... - Cabel cabel() const; // 4m, 6m... + Cable cable() const; // 4m, 6m... Series series() const; // x, c, a... int phaseCount() const; // 1 or 3 Meter meter() const; // No meter, Calibrated, ... @@ -122,7 +122,7 @@ private: Connector m_connector; ConnectorType m_connectorType; ConnectorCurrent m_current; - Cabel m_cabel; + Cable m_cable; Series m_series; int m_phaseCount; Meter m_meter;