diff options
Diffstat (limited to 'src/corelib/io/qdatastream.h')
-rw-r--r-- | src/corelib/io/qdatastream.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index 31507fdf73..993a20fcd3 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -360,6 +360,14 @@ inline QDataStream &QDataStream::operator<<(quint32 i) inline QDataStream &QDataStream::operator<<(quint64 i) { return *this << qint64(i); } +template <typename Enum> +inline QDataStream &operator<<(QDataStream &s, QFlags<Enum> e) +{ return s << e.i; } + +template <typename Enum> +inline QDataStream &operator>>(QDataStream &s, QFlags<Enum> &e) +{ return s >> e.i; } + template <typename T> inline QDataStream &operator>>(QDataStream &s, QList<T> &l) { |