diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-05-27 11:51:24 +0200 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2021-05-28 10:49:33 +0200 |
commit | dd6d9afe48e0e0eeaa10b77e46a328df8ff1d573 (patch) | |
tree | d61af9baa77365b8b961c12ef6a18eb0900d2474 /src | |
parent | a9330ac6b0571e609ed45cf2a760b5c708dce6cc (diff) |
Replace QVariant::Int with QMetaType::Int
Fixes warning
opcuarelativenodepath.cpp(143): warning C4996: 'QVariant::Type': Use QMetaType::Type instead.
opcuarelativenodepath.cpp(180): warning C4996: 'QVariant::Type': Use QMetaType::Type instead.
Change-Id: Ie0521a62758abdd36612970a9f8d8ced548fca61
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/opcua/opcuarelativenodepath.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/opcua/opcuarelativenodepath.cpp b/src/imports/opcua/opcuarelativenodepath.cpp index 8b42ed8..afb271c 100644 --- a/src/imports/opcua/opcuarelativenodepath.cpp +++ b/src/imports/opcua/opcuarelativenodepath.cpp @@ -140,7 +140,7 @@ void OpcUaRelativeNodePath::setReferenceType(const QVariant &referenceType) if (referenceType.userType() == qMetaTypeId<QObject*>() && qobject_cast<OpcUaNodeId*>(referenceType.value<QObject*>())) valid = true; - else if (referenceType.userType() == QVariant::Int && QMetaEnum::fromType<QOpcUa::ReferenceTypeId>().valueToKey(referenceType.toInt())) + else if (referenceType.userType() == QMetaType::Int && QMetaEnum::fromType<QOpcUa::ReferenceTypeId>().valueToKey(referenceType.toInt())) valid = true; if (!valid) { @@ -177,7 +177,7 @@ QOpcUaRelativePathElement OpcUaRelativeNodePath::toRelativePathElement(QOpcUaCli x.setIsInverse(isInverse()); x.setIncludeSubtypes(includeSubtypes()); x.setTargetName(m_browseNode.toQualifiedName()); - if (m_referenceType.userType() == QVariant::Int + if (m_referenceType.userType() == QMetaType::Int || m_referenceType.userType() == qMetaTypeId<QOpcUa::ReferenceTypeId>()) x.setReferenceTypeId(m_referenceType.value<QOpcUa::ReferenceTypeId>()); else |