From 623bfe209371b6d35d030a66629b58f0f4f27b0d Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 6 Jul 2012 15:12:41 +0200 Subject: 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 Reviewed-by: Marc Mutz --- src/corelib/tools/qpoint.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/corelib/tools/qpoint.cpp') 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 @@ -325,6 +325,14 @@ QT_BEGIN_NAMESPACE \sa QPoint::operator*=() */ +/*! + \fn const QPoint operator+(const QPoint &point) + \relates QPoint + \since 5.0 + + Returns \a point unmodified. +*/ + /*! \fn const QPoint operator-(const QPoint &point) \overload @@ -663,6 +671,14 @@ QDebug operator<<(QDebug d, const QPointF &p) Returns a copy of the given \a point, multiplied by the given \a factor. */ +/*! + \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 -- cgit v1.2.3