summaryrefslogtreecommitdiff
path: root/src/corelib/io/qdatastream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qdatastream.h')
-rw-r--r--src/corelib/io/qdatastream.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index ecd55f71ae..db1bbfbd63 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -359,6 +359,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)
{