From d30c542fb90b502683a1920cfb020d7885af07e4 Mon Sep 17 00:00:00 2001 From: Jannis Voelker Date: Tue, 27 Feb 2024 16:06:58 +0100 Subject: Add QT_NO_DEBUG_STREAM to QOpcUaGenericStructValue Pick-to: 6.7 Change-Id: I616084d01be173b4bef61eb77d6650953647f8e0 Reviewed-by: Ivan Solovev --- src/opcua/client/qopcuagenericstructvalue.cpp | 4 ++++ src/opcua/client/qopcuagenericstructvalue.h | 6 ++++++ 2 files changed, 10 insertions(+) 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 +#include + QT_BEGIN_NAMESPACE /*! @@ -250,6 +252,7 @@ void QOpcUaGenericStructValue::setFields(const QHash &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 &fieldsRef(); Q_OPCUA_EXPORT void setFields(const QHash &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 data; -- cgit v1.2.3