From 913f4f1a6fbc90e2b96a8008621693c9b2be7c7a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 16 Feb 2024 02:37:47 +0100 Subject: [PATCH] QDataStream: also disable streaming of member pointers 2fd4a86dc5547d6ff3f512bd33ccf6e10d159ff4 disabled the streaming of pointer with QDataStream, as they would otherwise accidentally select the `bool` overload. Do the same for member pointers. Change-Id: I4910953a2856957518b4e51bdc4a0c26d75addab Reviewed-by: Thiago Macieira --- src/corelib/serialization/qdatastream.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h index b01a785ddc..616f6330d9 100644 --- a/src/corelib/serialization/qdatastream.h +++ b/src/corelib/serialization/qdatastream.h @@ -177,6 +177,8 @@ public: QDataStream &operator<<(char16_t c); QDataStream &operator<<(char32_t c); QDataStream &operator<<(const volatile void *) = delete; + template + QDataStream &operator<<(T C::*) = delete; #if QT_DEPRECATED_SINCE(6, 11) QT_DEPRECATED_VERSION_X_6_11("Use an overload that takes qint64 length.")