diff --git a/src/libs/vmisc/vdatastreamenum.h b/src/libs/vmisc/vdatastreamenum.h index 77b3c228c..dd57f7fc4 100644 --- a/src/libs/vmisc/vdatastreamenum.h +++ b/src/libs/vmisc/vdatastreamenum.h @@ -60,13 +60,15 @@ QDataStream& operator>>(QDataStream& stream, Enum& e) template inline QDataStream &operator<<(QDataStream &s, QFlags e) { - return s << e.i; + return s << static_cast(e); } template inline QDataStream &operator>>(QDataStream &s, QFlags &e) { - return s >> e.i; + int v; + s >> v; + e = static_cast>(v); } #endif