Fix access to private member.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-07-01 18:13:46 +03:00
parent 4bd9cf381e
commit fc73ace034

View File

@ -60,13 +60,15 @@ QDataStream& operator>>(QDataStream& stream, Enum& e)
template <typename Enum>
inline QDataStream &operator<<(QDataStream &s, QFlags<Enum> e)
{
return s << e.i;
return s << static_cast<int>(e);
}
template <typename Enum>
inline QDataStream &operator>>(QDataStream &s, QFlags<Enum> &e)
{
return s >> e.i;
int v;
s >> v;
e = static_cast<QFlags<Enum>>(v);
}
#endif