summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannis Voelker <jannis.voelker@basyskom.com>2024-02-27 16:06:58 +0100
committerJannis Voelker <jannis.voelker@basyskom.com>2024-02-29 16:28:42 +0100
commitd30c542fb90b502683a1920cfb020d7885af07e4 (patch)
tree4ed675ed6e995be2f01cdff038fc6c385dd876eb
parentb7e78217246eab180d17aa493e1b5328c828b82f (diff)
Add QT_NO_DEBUG_STREAM to QOpcUaGenericStructValue
Pick-to: 6.7 Change-Id: I616084d01be173b4bef61eb77d6650953647f8e0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
-rw-r--r--src/opcua/client/qopcuagenericstructvalue.cpp4
-rw-r--r--src/opcua/client/qopcuagenericstructvalue.h6
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;