From c4f122927a85dac85ba3432cf84b0d2e66c54cda Mon Sep 17 00:00:00 2001 From: Aaron Linville Date: Sat, 11 Feb 2017 23:57:44 -0500 Subject: Doc: Fix minor typos in QRectF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Michael Brüning Reviewed-by: Marc Mutz Reviewed-by: Topi Reiniö --- src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp | 4 ++-- src/corelib/tools/qrect.cpp | 6 +++--- 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 -- cgit v1.2.3