diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2024-02-16 02:37:47 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2024-02-16 14:13:09 +0100 |
commit | 913f4f1a6fbc90e2b96a8008621693c9b2be7c7a (patch) | |
tree | e47a51a51cd96e7b4fef284e13050560c27dd522 /src/corelib/serialization/qdatastream.h | |
parent | 8eb599566ea983869298fe1f3362918bf0651f11 (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/serialization/qdatastream.h')
-rw-r--r-- | src/corelib/serialization/qdatastream.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <typename T, typename C> + QDataStream &operator<<(T C::*) = delete; #if QT_DEPRECATED_SINCE(6, 11) QT_DEPRECATED_VERSION_X_6_11("Use an overload that takes qint64 length.") |