diff options
-rw-r--r-- | src/opcua/client/qopcuagenericstructvalue.cpp | 4 | ||||
-rw-r--r-- | src/opcua/client/qopcuagenericstructvalue.h | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/opcua/client/qopcuagenericstructvalue.cpp b/src/opcua/client/qopcuagenericstructvalue.cpp index 9033dc5..c01a92d 100644 --- a/src/opcua/client/qopcuagenericstructvalue.cpp +++ b/src/opcua/client/qopcuagenericstructvalue.cpp @@ -3,6 +3,8 @@ #include <QtOpcUa/qopcuagenericstructvalue.h> +#include <QtCore/qdebug.h> + QT_BEGIN_NAMESPACE /*! @@ -250,6 +252,7 @@ void QOpcUaGenericStructValue::setFields(const QHash<QString, QVariant> &fields) } } +#ifndef QT_NO_DEBUG_STREAM /*! Returns a string representation for this generic struct value. */ @@ -282,5 +285,6 @@ QDebug operator<<(QDebug debug, const QOpcUaGenericStructValue &s) debug << ")"; return debug; } +#endif QT_END_NAMESPACE diff --git a/src/opcua/client/qopcuagenericstructvalue.h b/src/opcua/client/qopcuagenericstructvalue.h index 24a0f64..50e79d6 100644 --- a/src/opcua/client/qopcuagenericstructvalue.h +++ b/src/opcua/client/qopcuagenericstructvalue.h @@ -11,6 +11,10 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_DEBUG_STREAM +class QDebug; +#endif + class QOpcUaGenericStructValueData; QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QOpcUaGenericStructValueData, Q_OPCUA_EXPORT) class QOpcUaGenericStructValue { @@ -46,9 +50,11 @@ public: Q_OPCUA_EXPORT QHash<QString, QVariant> &fieldsRef(); Q_OPCUA_EXPORT void setFields(const QHash<QString, QVariant> &fields); +#ifndef QT_NO_DEBUG_STREAM Q_OPCUA_EXPORT QString toString() const; friend QDebug Q_OPCUA_EXPORT operator<<(QDebug debug, const QOpcUaGenericStructValue &s); +#endif private: QExplicitlySharedDataPointer<QOpcUaGenericStructValueData> data; |