summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qline.cpp
diff options
context:
space:
mode:
authorartoka <arto.katajasalo@digia.com>2011-11-01 12:47:11 (GMT)
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-11-01 13:10:18 (GMT)
commitadc3ba426acee1c27e8f62c418b5d458784dbefa (patch)
tree6e0f7ae8978611c1c2192f23f552364f8ed48a3a /src/corelib/tools/qline.cpp
parentf0c52aaa9cbb8688b2880faf61c4d589d17bc3cb (diff)
downloadQt-adc3ba426acee1c27e8f62c418b5d458784dbefa.zip
Qt-adc3ba426acee1c27e8f62c418b5d458784dbefa.tar.gz
Qt-adc3ba426acee1c27e8f62c418b5d458784dbefa.tar.bz2
Fix multiple typos in QLineF documentation.
QLineF::angleTo, QLineF::setLength(), QLineF::dx() and QLineF::dy() were missing detailed information QLineF::angleTo - method returns the angle of two lines compared to each other. Documentation stated that the return value is in degrees. This fix adds specific information that the return value (angle) is returned in _positive_ degrees. setLength()-method missed information whether the angle is also changed if the given length is negative. Added mention that angle is also changed. dx() and dy() didn't mention whether the return value is negative or positive. Added mention that positive if p2()>=p1() else negative. Task-numbers: QTBUG-14759, QTBUG-14756, QTBUG-14677 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/corelib/tools/qline.cpp')
-rw-r--r--src/corelib/tools/qline.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp
index 9c7c243..7e3dd34 100644
--- a/src/corelib/tools/qline.cpp
+++ b/src/corelib/tools/qline.cpp
@@ -488,7 +488,8 @@ bool QLineF::isNull() const
/*!
\fn qreal QLineF::dx() const
- Returns the horizontal component of the line's vector.
+ Returns the horizontal component of the line's vector.
+ Return value is positive if x2() >= x1() and negative if x2() < x1().
\sa dy(), pointAt()
*/
@@ -497,6 +498,7 @@ bool QLineF::isNull() const
\fn qreal QLineF::dy() const
Returns the vertical component of the line's vector.
+ Return value is positive if y2() >= y1() and negative if y2() < y1().
\sa dx(), pointAt()
*/
@@ -506,7 +508,8 @@ bool QLineF::isNull() const
Sets the length of the line to the given \a length. QLineF will
move the end point - p2() - of the line to give the line its new length.
-
+ If the given \a length is negative the angle() is also changed.
+
If the line is a null line, the length will remain zero regardless
of the length specified.
@@ -762,7 +765,7 @@ QLineF::IntersectType QLineF::intersect(const QLineF &l, QPointF *intersectionPo
\since 4.4
- Returns the angle (in degrees) from this line to the given \a
+ Returns the angle (in positive degrees) from this line to the given \a
line, taking the direction of the lines into account. If the lines
do not intersect within their range, it is the intersection point of
the extended lines that serves as origin (see