Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P4: Low
-
Resolution: Done
-
Affects Version/s: 5.7.1
-
Fix Version/s: 5.9.0 Beta 2
-
Component/s: Core: Other
-
Labels:None
-
Commits:e7295c959b73cec09e36d3703d5619e8e7aa5fb1
Description
Hi,
If I add the following flag into my pro file:
QMAKE_CXXFLAGS += -Wfloat-equal
I get a number of warnings about float comparison with == in Qt code in following classes:
- QTransform
- QRectF
- QVector2D
Typical example:
Q_DECL_CONSTEXPR inline bool operator==(const QVector2D &v1, const QVector2D &v2) { return v1.xp == v2.xp && v1.yp == v2.yp; }
I think all these comparisons should use the QFuzzy functions.