diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2024-04-05 11:59:30 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2024-05-10 15:33:39 +0200 |
commit | 2a847dd93b1b9cc363eefa27686d78a4bc399d1e (patch) | |
tree | 490d7b81768321102e01919a6a96c0712147a2ba /src/corelib/compat/removed_api.cpp | |
parent | fa0d77e290f5ccb5afa7d02716f8726aa6b810e6 (diff) |
QLine(F): use comparison helper macros
Also explicitly add QLineF vs QLine comparison. Previously such
comparison was implicitly converting QLine to QLineF, and doing the
fuzzy comparison.
The new operators are directly calling operator==(QPointF, QPoint),
which also does the fuzzy comparison, so the old behavior is preserved.
Remove the old relational operators using QT_CORE_REMOVED_SINCE, but
also wrap the new operators in !defined(QT_CORE_REMOVED_SINCE).
That is required, because on Windows the instantiation of
QMetaTypeInterface<QLine(F)> happens in removed_api.cpp (as both
qline.h and qmetatype.h are already included there). If we just add
removed member operators into removed_api.cpp, the metatype interface
will not be able to create an equals() function, because of the
ambiguity in equality operators (member vs friend). That's why we have
to exclude the new friend operators from removed_api.cpp.
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Task-number: QTBUG-120308
Change-Id: Ibbf5ec077f69c75da0d36a8be5596acd0fcd44d0
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Diffstat (limited to 'src/corelib/compat/removed_api.cpp')
-rw-r--r-- | src/corelib/compat/removed_api.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index 3c6123ed15..1b987f7886 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -1005,6 +1005,8 @@ bool QJsonValue::operator!=(const QJsonValue &other) const return !comparesEqual(*this, other); } +#include "qline.h" // inlined API + #include "qmimetype.h" bool QMimeType::operator==(const QMimeType &other) const |