summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-11-03 15:39:25 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-11-03 15:39:25 (GMT)
commit0b9aa12659d5ea6b15fe72f963cc98db9af585fc (patch)
tree01ad0331329755c17a97c4a861a899268eb3c647 /src/corelib/tools
parentd5a44f3489b48027db3f0955190446e0324d6bf5 (diff)
downloadQt-0b9aa12659d5ea6b15fe72f963cc98db9af585fc.zip
Qt-0b9aa12659d5ea6b15fe72f963cc98db9af585fc.tar.gz
Qt-0b9aa12659d5ea6b15fe72f963cc98db9af585fc.tar.bz2
Document the difference between +0.0 and -0.0 for QPointF and QSizeF.
Reviewed-by: Robert Griebl
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qpoint.cpp6
-rw-r--r--src/corelib/tools/qsize.cpp6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index 66f06e9..c297709 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -438,8 +438,12 @@ QDebug operator<<(QDebug d, const QPointF &p)
/*!
\fn bool QPointF::isNull() const
- Returns true if both the x and y coordinates are set to 0.0,
+ Returns true if both the x and y coordinates are set to +0.0;
otherwise returns false.
+
+ \note Since this function treats +0.0 and -0.0 differently, points
+ with zero-valued coordinates where either or both values have a
+ negative sign are not defined to be null points.
*/
diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp
index 20ac344..12287ab 100644
--- a/src/corelib/tools/qsize.cpp
+++ b/src/corelib/tools/qsize.cpp
@@ -492,9 +492,13 @@ QDebug operator<<(QDebug dbg, const QSize &s) {
/*!
\fn bool QSizeF::isNull() const
- Returns true if both the width and height is 0; otherwise returns
+ Returns true if both the width and height are +0.0; otherwise returns
false.
+ \note Since this function treats +0.0 and -0.0 differently, sizes with
+ zero width and height where either or both values have a negative
+ sign are not defined to be null sizes.
+
\sa isValid(), isEmpty()
*/