diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-02-09 10:45:48 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-03-14 15:55:12 +0100 |
commit | 67385c04ce272cf553bc2e8aa8e923cd7851fc66 (patch) | |
tree | 6fbe4250ed28787282cb1c9a1cc04e555fcd084b /src/corelib/serialization/qdatastream.h | |
parent | 06c2ffdae7aecc912b4541a4049ab6aab49cab65 (diff) |
QDataStream: make qfloat16 streaming a non-member
Remove the member function from the API and re-add it as a hidden
friend on qfloat16, where it will be a complete type.
[ChangeLog][QtCore][Potentially Souce-Incompatible Changes] The
qfloat16 QDataStream operators are now hidden friends and only found
by argument-dependent lookup. Previously, these were member functions
on QDataStream.
Fixes: QTBUG-93499
Pick-to: 6.3
Change-Id: Ib3d4df7a3fe3a9d0938f3be8b70b50fef0416262
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/serialization/qdatastream.h')
-rw-r--r-- | src/corelib/serialization/qdatastream.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h index 584de3166a..ac0adc1bf9 100644 --- a/src/corelib/serialization/qdatastream.h +++ b/src/corelib/serialization/qdatastream.h @@ -51,7 +51,9 @@ QT_BEGIN_NAMESPACE +#if QT_CORE_REMOVED_SINCE(6, 3) class qfloat16; +#endif class QByteArray; class QIODevice; @@ -160,8 +162,9 @@ public: QDataStream &operator>>(std::nullptr_t &ptr) { ptr = nullptr; return *this; } QDataStream &operator>>(bool &i); - // ### Qt 7: remove the operator or make qfloat16 fully defined, see QTBUG-93499 +#if QT_CORE_REMOVED_SINCE(6, 3) QDataStream &operator>>(qfloat16 &f); +#endif QDataStream &operator>>(float &f); QDataStream &operator>>(double &f); QDataStream &operator>>(char *&str); @@ -179,8 +182,9 @@ public: QDataStream &operator<<(quint64 i); QDataStream &operator<<(std::nullptr_t) { return *this; } QDataStream &operator<<(bool i); - // ### Qt 7: remove the operator or make qfloat16 fully defined, see QTBUG-93499 +#if QT_CORE_REMOVED_SINCE(6, 3) QDataStream &operator<<(qfloat16 f); +#endif QDataStream &operator<<(float f); QDataStream &operator<<(double f); QDataStream &operator<<(const char *str); |