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 <edward.welbourne@qt.io>
This commit is contained in:
Ievgenii Meshcheriakov 2021-09-10 17:33:28 +02:00 committed by Edward Welbourne
parent 9ecce4dff4
commit 884e5c2c75

View File

@ -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);