diff options
author | Rainer Keller <Rainer.Keller@qt.io> | 2018-09-13 10:04:07 +0200 |
---|---|---|
committer | Rainer Keller <Rainer.Keller@qt.io> | 2018-09-17 13:44:02 +0000 |
commit | cdf465babd7fbf406498d9963be28084d956e290 (patch) | |
tree | eb0f53b770e08702df0a2be2b4f724f39d352c08 /src/imports/opcua/opcuanode.h | |
parent | 7a0eca889996309c04aca65a2fceea2a45d1a343 (diff) |
Convert QLocalizedText to a gadget
This will not add any overhead to execution but saves a lot of QML hassle
because the wrapper that was present before needs to have additional
converter functions to allow QML to unwrap LocalizedText to QLocalizedText
in case it is returned in a QVariant. This happens for example if a node
method called on a server returns such types.
Change-Id: I664c417d1bebdc266764d51d564d12d98a4101a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/imports/opcua/opcuanode.h')
-rw-r--r-- | src/imports/opcua/opcuanode.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/imports/opcua/opcuanode.h b/src/imports/opcua/opcuanode.h index 9148fbf..c5763bd 100644 --- a/src/imports/opcua/opcuanode.h +++ b/src/imports/opcua/opcuanode.h @@ -37,7 +37,7 @@ #pragma once #include <QObject> -#include "opcuatype.h" +#include "qopcuatype.h" #include "universalnode.h" #include "opcuaattributecache.h" @@ -58,8 +58,8 @@ class OpcUaNode : public QObject // basic node properties Q_PROPERTY(QString browseName READ browseName WRITE setBrowseName NOTIFY browseNameChanged) Q_PROPERTY(QOpcUa::NodeClass nodeClass READ nodeClass NOTIFY nodeClassChanged) - Q_PROPERTY(LocalizedText displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged) - Q_PROPERTY(LocalizedText description READ description WRITE setDescription NOTIFY descriptionChanged) + Q_PROPERTY(QOpcUa::QLocalizedText displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged) + Q_PROPERTY(QOpcUa::QLocalizedText description READ description WRITE setDescription NOTIFY descriptionChanged) Q_ENUM(QOpcUa::NodeClass); @@ -75,11 +75,11 @@ public: QOpcUa::NodeClass nodeClass(); - void setDisplayName(const LocalizedText &value); - LocalizedText displayName(); + void setDisplayName(const QOpcUa::QLocalizedText &value); + QOpcUa::QLocalizedText displayName(); - void setDescription(const LocalizedText &value); - LocalizedText description(); + void setDescription(const QOpcUa::QLocalizedText &value); + QOpcUa::QLocalizedText description(); // This function is not exposed to QML const UniversalNode &resolvedNode() const; |