summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Linville <aaron@linville.org>2017-02-11 23:57:44 -0500
committerAaron Linville <aaron@linville.org>2017-02-23 20:55:10 +0000
commitc4f122927a85dac85ba3432cf84b0d2e66c54cda (patch)
tree6baf0737ed8d686719a07ae83e7be33d22cf26a1
parent9ffc9e306f639b005dafd67faa122ad0db1b7b86 (diff)
Doc: Fix minor typos in QRectF
Fix a couple incorrect references to the integer precision classes. Update snippet to use floating point precision classes. Task-number: QTBUG-51630 Change-Id: I9b08cfb68937a8e1179ee414d7981956ef7bc106 Reviewed-by: Martin Koller <kollix@aon.at> Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp4
-rw-r--r--src/corelib/tools/qrect.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp
index 1c7f9d4b54..4bdaa4d657 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp
@@ -55,6 +55,6 @@ QRect r2(QPoint(100, 200), QSize(11, 16));
//! [1]
-QRectF r1(100, 200, 11, 16);
-QRectF r2(QPoint(100, 200), QSize(11, 16));
+QRectF r1(100.0, 200.1, 11.2, 16.3);
+QRectF r2(QPointF(100.0, 200.1), QSizeF(11.2, 16.3));
//! [1]
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp
index 4b6183646b..895b6b9701 100644
--- a/src/corelib/tools/qrect.cpp
+++ b/src/corelib/tools/qrect.cpp
@@ -1323,8 +1323,8 @@ QDebug operator<<(QDebug dbg, const QRect &r)
rendering.
A QRectF can be constructed with a set of left, top, width and
- height integers, or from a QPoint and a QSize. The following code
- creates two identical rectangles.
+ height coordinates, or from a QPointF and a QSizeF. The following
+ code creates two identical rectangles.
\snippet code/src_corelib_tools_qrect.cpp 1
@@ -1344,7 +1344,7 @@ QDebug operator<<(QDebug dbg, const QRect &r)
translated copy of this rectangle.
The size() function returns the rectange's dimensions as a
- QSize. The dimensions can also be retrieved separately using the
+ QSizeF. The dimensions can also be retrieved separately using the
width() and height() functions. To manipulate the dimensions use
the setSize(), setWidth() or setHeight() functions. Alternatively,
the size can be changed by applying either of the functions