QDataStream has operators for enums since Qt 5.14

This commit is contained in:
Mat Sutcliffe
2019-12-30 18:18:12 +00:00
parent 1f0c65135d
commit 25946d1141

View File

@@ -91,6 +91,7 @@ namespace BlackMisc
} }
} }
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
/*! /*!
* Operator for marshalling enums with QDataStream. * Operator for marshalling enums with QDataStream.
*/ */
@@ -111,6 +112,7 @@ QDataStream &operator >>(QDataStream &stream, E &value)
value = static_cast<E>(temp); value = static_cast<E>(temp);
return stream; return stream;
} }
#endif // Qt < 5.14.0
/*! /*!
* Operator for marshalling pairs with QDataStream. * Operator for marshalling pairs with QDataStream.