summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qpoint.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@nokia.com>2012-07-06 15:12:41 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-12 01:46:20 +0200
commit623bfe209371b6d35d030a66629b58f0f4f27b0d (patch)
treef4e710544947c86ad95df98101dce2411570f5f9 /src/corelib/tools/qpoint.cpp
parent74b0206a714a32102a7ea5dcc6dad580bd4a600c (diff)
Add unary operator+ to QPoint and QPointF.
As requested by Winfried Schenke: "QPoint should have an unary operator+ (the unary operator- exists). Classes with arithmetic operators should provide a complete set of operators, because some template code relies on it." Task-number: QTBUG-22913 Change-Id: Ib0c5105975f56c15f00bb48d83c8d911f5a204ac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/tools/qpoint.cpp')
-rw-r--r--src/corelib/tools/qpoint.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index 368ef7d697..785e255db5 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -326,6 +326,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn const QPoint operator+(const QPoint &point)
+ \relates QPoint
+ \since 5.0
+
+ Returns \a point unmodified.
+*/
+
+/*!
\fn const QPoint operator-(const QPoint &point)
\overload
\relates QPoint
@@ -664,6 +672,14 @@ QDebug operator<<(QDebug d, const QPointF &p)
*/
/*!
+ \fn const QPointF operator+(const QPointF &point)
+ \relates QPointF
+ \since 5.0
+
+ Returns \a point unmodified.
+*/
+
+/*!
\fn const QPointF operator-(const QPointF &point)
\relates QPointF
\overload