Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.7.1
-
None
-
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.
Attachments
For Gerrit Dashboard: QTBUG-57649 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
180226,2 | Suppress the -Wfloat-equal warning | 5.8 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
180227,3 | Add -Wfloat-equal to Qt's header clean check | 5.8 | qt/qtbase | Status: MERGED | +2 | 0 |