From 884e5c2c75a8e4d09da4f2c32b90a09436a7bda1 Mon Sep 17 00:00:00 2001 From: Ievgenii Meshcheriakov Date: Fri, 10 Sep 2021 17:33:28 +0200 Subject: [PATCH] QDataStream: Add reminders to remove operators for qfloat16 Having I/O operators defined for incomplete types causes hard to diagnose problems when types with template conversion operators are used as arguments to signals or slots. Removing qfloat16 operators is not possible before Qt 7 because of backward compatibility. Task-number: QTBUG-93499 Change-Id: Ifa296bb58c45a06abf79dbe5666a666adaa8eab9 Reviewed-by: Edward Welbourne --- src/corelib/serialization/qdatastream.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h index 4e2d785c5e7..28984d8ba94 100644 --- a/src/corelib/serialization/qdatastream.h +++ b/src/corelib/serialization/qdatastream.h @@ -159,6 +159,7 @@ 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 QDataStream &operator>>(qfloat16 &f); QDataStream &operator>>(float &f); QDataStream &operator>>(double &f); @@ -177,6 +178,7 @@ 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 QDataStream &operator<<(qfloat16 f); QDataStream &operator<<(float f); QDataStream &operator<<(double f);