From cca62a7360a117880eea5821fd7403d68a1431c8 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 21 Oct 2020 21:55:04 +0200 Subject: QRectF/QPointF/QSizeF: document that operator== and != are fuzzy This has been the case for a _very_ long time, and I can't believe this hasn't been documented anywhere. Change-Id: Ib157edf14e87a6f546c155496f70a760ab218cca Pick-to: 5.15 5.12 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Paul Wicking --- src/corelib/tools/qsize.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/corelib/tools/qsize.cpp') diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp index 57b2cc0319..788356002c 100644 --- a/src/corelib/tools/qsize.cpp +++ b/src/corelib/tools/qsize.cpp @@ -743,14 +743,23 @@ QSizeF QSizeF::scaled(const QSizeF &s, Qt::AspectRatioMode mode) const noexcept /*! \fn bool QSizeF::operator==(const QSizeF &s1, const QSizeF &s2) - Returns \c true if \a s1 and \a s2 are equal; otherwise returns - false. + Returns \c true if \a s1 and \a s2 are approximately equal; otherwise + returns false. + + \warning This function does not check for strict equality; instead, + it uses a fuzzy comparison to compare the sizes' extents. + + \sa qFuzzyCompare */ /*! \fn bool QSizeF::operator!=(const QSizeF &s1, const QSizeF &s2) - Returns \c true if \a s1 and \a s2 are different; otherwise returns \c false. + Returns \c true if \a s1 and \a s2 are sufficiently different; otherwise + returns \c false. + + \warning This function does not check for strict inequality; instead, + it uses a fuzzy comparison to compare the sizes' extents. */ /*! -- cgit v1.2.3