summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJannis Voelker <jannis.voelker@basyskom.com>2023-09-22 13:48:10 +0200
committerJannis Voelker <jannis.voelker@basyskom.com>2023-09-26 11:54:14 +0200
commit1e53810ff6cec6fc1b9e3f34770ad4fc53a449ba (patch)
tree277c2af09133e2222f8660d165f2a7c026045da3 /examples
parent0a924214dce15f5608b9acb6c3515e2858e19ab9 (diff)
Fix issues pointed out by clazy
Change-Id: Ia530dd568f2247f6aca97253b8f28dd99392b956 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/opcua/opcuaviewer/treeitem.cpp10
-rw-r--r--examples/opcua/waterpump/simulationserver/simulationserver.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/opcua/opcuaviewer/treeitem.cpp b/examples/opcua/opcuaviewer/treeitem.cpp
index 449b4c4..b6cefe4 100644
--- a/examples/opcua/opcuaviewer/treeitem.cpp
+++ b/examples/opcua/opcuaviewer/treeitem.cpp
@@ -324,9 +324,9 @@ QString TreeItem::variantToString(const QVariant &value, const QString &typeNode
if (value.canConvert<QOpcUaAxisInformation>()) {
const auto info = value.value<QOpcUaAxisInformation>();
return QStringLiteral("[EUInformation: %1, EURange: %2, Title: %3 , AxisScaleType: %4, AxisSteps: %5]").arg(
- euInformationToString(info.engineeringUnits())).arg(rangeToString(info.eURange())).arg(localizedTextToString(info.title())).arg(
- info.axisScaleType() == QOpcUa::AxisScale::Linear ? "Linear" : (info.axisScaleType() == QOpcUa::AxisScale::Ln) ? "Ln" : "Log").arg(
- numberArrayToString(info.axisSteps()));
+ euInformationToString(info.engineeringUnits()), rangeToString(info.eURange()), localizedTextToString(info.title()),
+ info.axisScaleType() == QOpcUa::AxisScale::Linear ? "Linear" : (info.axisScaleType() == QOpcUa::AxisScale::Ln) ? "Ln" : "Log",
+ numberArrayToString(info.axisSteps()));
}
if (value.canConvert<QOpcUaExpandedNodeId>()) {
const auto id = value.value<QOpcUaExpandedNodeId>();
@@ -366,7 +366,7 @@ QString TreeItem::variantToString(const QVariant &value, const QString &typeNode
QString TreeItem::localizedTextToString(const QOpcUaLocalizedText &text) const
{
- return QStringLiteral("[Locale: \"%1\", Text: \"%2\"]").arg(text.locale()).arg(text.text());
+ return QStringLiteral("[Locale: \"%1\", Text: \"%2\"]").arg(text.locale(), text.text());
}
QString TreeItem::rangeToString(const QOpcUaRange &range) const
@@ -377,5 +377,5 @@ QString TreeItem::rangeToString(const QOpcUaRange &range) const
QString TreeItem::euInformationToString(const QOpcUaEUInformation &info) const
{
return QStringLiteral("[UnitId: %1, NamespaceUri: \"%2\", DisplayName: %3, Description: %4]").arg(info.unitId()).arg(
- info.namespaceUri()).arg(localizedTextToString(info.displayName())).arg(localizedTextToString(info.description()));
+ info.namespaceUri(), localizedTextToString(info.displayName()), localizedTextToString(info.description()));
}
diff --git a/examples/opcua/waterpump/simulationserver/simulationserver.cpp b/examples/opcua/waterpump/simulationserver/simulationserver.cpp
index cc7850e..5c8ad48 100644
--- a/examples/opcua/waterpump/simulationserver/simulationserver.cpp
+++ b/examples/opcua/waterpump/simulationserver/simulationserver.cpp
@@ -365,7 +365,7 @@ void DemoServer::launch()
UA_NodeId_clear(&tank1Object);
UA_NodeId_clear(&tank2Object);
- QObject::connect(&m_machineTimer, &QTimer::timeout, [this]() {
+ QObject::connect(&m_machineTimer, &QTimer::timeout, this, [this]() {
double targetValue = readTank2TargetValue();
if (m_state == MachineState::Pumping && m_percentFilledTank1 > 0 && m_percentFilledTank2 < targetValue) {