Skip to content

Commit

Permalink
QDataStream: also disable streaming of member pointers
Browse files Browse the repository at this point in the history
2fd4a86 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>
  • Loading branch information
dangelog committed Feb 16, 2024
1 parent 8eb5995 commit 913f4f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/corelib/serialization/qdatastream.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ class Q_CORE_EXPORT QDataStream : public QIODeviceBase
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.")
Expand Down

0 comments on commit 913f4f1

Please sign in to comment.