diff --git a/src/libs/vmisc/vdatastreamenum.h b/src/libs/vmisc/vdatastreamenum.h index b158e80b2..77b3c228c 100644 --- a/src/libs/vmisc/vdatastreamenum.h +++ b/src/libs/vmisc/vdatastreamenum.h @@ -56,4 +56,18 @@ QDataStream& operator>>(QDataStream& stream, Enum& e) return stream; } +#if QT_VERSION < QT_VERSION_CHECK(5, 9, 0) +template +inline QDataStream &operator<<(QDataStream &s, QFlags e) +{ + return s << e.i; +} + +template +inline QDataStream &operator>>(QDataStream &s, QFlags &e) +{ + return s >> e.i; +} +#endif + #endif // DATASTREAM_ENUM_H