Fix access to private member.
--HG-- branch : develop
This commit is contained in:
parent
4bd9cf381e
commit
fc73ace034
|
@ -60,13 +60,15 @@ QDataStream& operator>>(QDataStream& stream, Enum& e)
|
||||||
template <typename Enum>
|
template <typename Enum>
|
||||||
inline QDataStream &operator<<(QDataStream &s, QFlags<Enum> e)
|
inline QDataStream &operator<<(QDataStream &s, QFlags<Enum> e)
|
||||||
{
|
{
|
||||||
return s << e.i;
|
return s << static_cast<int>(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Enum>
|
template <typename Enum>
|
||||||
inline QDataStream &operator>>(QDataStream &s, QFlags<Enum> &e)
|
inline QDataStream &operator>>(QDataStream &s, QFlags<Enum> &e)
|
||||||
{
|
{
|
||||||
return s >> e.i;
|
int v;
|
||||||
|
s >> v;
|
||||||
|
e = static_cast<QFlags<Enum>>(v);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user