diff options
author | Jannis Voelker <jannis.voelker@basyskom.com> | 2018-09-17 08:14:27 +0200 |
---|---|---|
committer | Rainer Keller <Rainer.Keller@qt.io> | 2018-09-17 13:46:28 +0000 |
commit | d1888ef6c83ea2d6bc582fff3f66364550d84f22 (patch) | |
tree | 089f8dc8ac2cb8716b441b389f763e28edc80573 /src/opcua/client/qopcuatype.cpp | |
parent | cdf465babd7fbf406498d9963be28084d956e290 (diff) |
Rename QOpcUa::NodeIds::NS0 to QOpcUa::NodeIds::Namespace0
The abbreviation "ns0" is also removed from the converter
functions in qopcuatype.cpp.
Change-Id: Ic8e9aed4891f9e550f4e00105182744f1eb9b2e3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/opcua/client/qopcuatype.cpp')
-rw-r--r-- | src/opcua/client/qopcuatype.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/opcua/client/qopcuatype.cpp b/src/opcua/client/qopcuatype.cpp index 4512b17..4d97802 100644 --- a/src/opcua/client/qopcuatype.cpp +++ b/src/opcua/client/qopcuatype.cpp @@ -947,28 +947,28 @@ bool QOpcUa::nodeIdEquals(const QString &first, const QString &second) /*! Returns a node id string for the namespace 0 identifier \a id. */ -QString QOpcUa::ns0ID(QOpcUa::NodeIds::NS0 id) +QString QOpcUa::namespace0Id(QOpcUa::NodeIds::Namespace0 id) { return QStringLiteral("ns=0;i=%1").arg(quint32(id)); } /*! - Returns the enum value from \l QOpcUa::NodeIds::NS0 for \a nodeId. + Returns the enum value from \l QOpcUa::NodeIds::Namespace0 for \a nodeId. If the node id is not in namespace 0 or doesn't have a numeric identifier which is part of the OPC Foundation's NodeIds.csv file, - \l {QOpcUa::NodeIds::NS0} {Unknown} is returned. + \l {QOpcUa::NodeIds::Namespace0} {Unknown} is returned. If Qt OPC UA has been configured with -no-feature-ns0idnames, the check if the numeric identifier is part of the NodeIds.csv file is omitted. If the node id is in namespace 0 and has a numeric identifier, the identifier is returned regardless if it - is part of the \l QOpcUa::NodeIds::NS0 enum. + is part of the \l QOpcUa::NodeIds::Namespace0 enum. */ -QOpcUa::NodeIds::NS0 QOpcUa::ns0IDFromNodeId(const QString &nodeId) +QOpcUa::NodeIds::Namespace0 QOpcUa::namespace0IdFromNodeId(const QString &nodeId) { if (!nodeId.startsWith(QLatin1String("ns=0;i="))) - return QOpcUa::NodeIds::NS0::Unknown; + return QOpcUa::NodeIds::Namespace0::Unknown; QStringRef sr = nodeId.midRef(7); @@ -976,14 +976,14 @@ QOpcUa::NodeIds::NS0 QOpcUa::ns0IDFromNodeId(const QString &nodeId) quint32 identifier = sr.toUInt(&ok); if (!ok) - return QOpcUa::NodeIds::NS0::Unknown; + return QOpcUa::NodeIds::Namespace0::Unknown; #ifndef QT_OPCUA_NO_NS0IDNAMES - if (!QMetaEnum::fromType<QOpcUa::NodeIds::NS0>().valueToKey(identifier)) - return QOpcUa::NodeIds::NS0::Unknown; + if (!QMetaEnum::fromType<QOpcUa::NodeIds::Namespace0>().valueToKey(identifier)) + return QOpcUa::NodeIds::Namespace0::Unknown; #endif - return QOpcUa::NodeIds::NS0(identifier); + return QOpcUa::NodeIds::Namespace0(identifier); } /*! @@ -992,15 +992,15 @@ QOpcUa::NodeIds::NS0 QOpcUa::ns0IDFromNodeId(const QString &nodeId) If \a id is unknown or Qt OPC UA has been configured with -no-feature-ns0idnames, an empty string is returned. */ -QString QOpcUa::ns0IDName(QOpcUa::NodeIds::NS0 id) +QString QOpcUa::namespace0IdName(QOpcUa::NodeIds::Namespace0 id) { #ifdef QT_OPCUA_NO_NS0IDNAMES Q_UNUSED(id); return QString(); #else - if (id == QOpcUa::NodeIds::NS0::Unknown) + if (id == QOpcUa::NodeIds::Namespace0::Unknown) return QString(); - return QString::fromUtf8(QMetaEnum::fromType<QOpcUa::NodeIds::NS0>().valueToKey(quint32(id))); + return QString::fromUtf8(QMetaEnum::fromType<QOpcUa::NodeIds::Namespace0>().valueToKey(quint32(id))); #endif } |