summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-22 16:21:52 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-23 00:58:11 +0200
commita6327d7305ef346228669ef604cb77f4780d7c53 (patch)
tree625b3013ea7f02a67e084867affe0e5c07b9328b /src/corelib/tools
parent35e4740385cf65f23e72adcb81ecded6d4640013 (diff)
Fix documentation for hidden friend operators
At least for qdoc, hidden friends are class members. Change-Id: I6eaa21565937cd49c0905ee47b8b82b0c1765bc1 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qiterator.qdoc6
-rw-r--r--src/corelib/tools/qpoint.cpp66
-rw-r--r--src/corelib/tools/qsize.cpp42
-rw-r--r--src/corelib/tools/qtaggedpointer.qdoc22
4 files changed, 46 insertions, 90 deletions
diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc
index eacc504557..c6bff94c99 100644
--- a/src/corelib/tools/qiterator.qdoc
+++ b/src/corelib/tools/qiterator.qdoc
@@ -89,8 +89,7 @@
\sa operator*()
*/
-/*! \fn template<typename Key, typename T, class Iterator> bool operator==(QKeyValueIterator<Key, T, Iterator> lhs, QKeyValueIterator<Key, T, Iterator> rhs)
- \relates QKeyValueIterator
+/*! \fn template<typename Key, typename T, class Iterator> bool QKeyValueIterator<Key, T, Iterator>::operator==(QKeyValueIterator<Key, T, Iterator> lhs, QKeyValueIterator<Key, T, Iterator> rhs)
Returns \c true if \a rhs points to the same item as \a lhs otherwise returns
\c false.
@@ -98,8 +97,7 @@
\sa operator!=()
*/
-/*! \fn template<typename Key, typename T, class Iterator> bool operator!=(QKeyValueIterator<Key, T, Iterator> lhs, QKeyValueIterator<Key, T, Iterator> rhs) const
- \relates QKeyValueIterator
+/*! \fn template<typename Key, typename T, class Iterator> bool QKeyValueIterator<Key, T, Iterator>::operator!=(QKeyValueIterator<Key, T, Iterator> lhs, QKeyValueIterator<Key, T, Iterator> rhs)
Returns \c true if \a rhs points to a different item than \a lhs otherwise
returns \c false.
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index eca1b5a0ac..e02fe2e41c 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -244,23 +244,20 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn bool operator==(const QPoint &p1, const QPoint &p2)
- \relates QPoint
+ \fn bool QPoint::operator==(const QPoint &p1, const QPoint &p2)
Returns \c true if \a p1 and \a p2 are equal; otherwise returns
false.
*/
/*!
- \fn bool operator!=(const QPoint &p1, const QPoint &p2)
- \relates QPoint
+ \fn bool QPoint::operator!=(const QPoint &p1, const QPoint &p2)
Returns \c true if \a p1 and \a p2 are not equal; otherwise returns \c false.
*/
/*!
- \fn const QPoint operator+(const QPoint &p1, const QPoint &p2)
- \relates QPoint
+ \fn QPoint QPoint::operator+(const QPoint &p1, const QPoint &p2)
Returns a QPoint object that is the sum of the given points, \a p1
and \a p2; each component is added separately.
@@ -269,8 +266,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator-(const QPoint &p1, const QPoint &p2)
- \relates QPoint
+ \fn Point QPoint::operator-(const QPoint &p1, const QPoint &p2)
Returns a QPoint object that is formed by subtracting \a p2 from
\a p1; each component is subtracted separately.
@@ -279,8 +275,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator*(const QPoint &point, float factor)
- \relates QPoint
+ \fn QPoint QPoint::operator*(const QPoint &point, float factor)
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -291,8 +286,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator*(const QPoint &point, double factor)
- \relates QPoint
+ \fn QPoint QPoint::operator*(const QPoint &point, double factor)
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -303,8 +297,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator*(const QPoint &point, int factor)
- \relates QPoint
+ \fn QPoint QPoint::operator*(const QPoint &point, int factor)
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -312,9 +305,8 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator*(float factor, const QPoint &point)
+ \fn QPoint QPoint::operator*(float factor, const QPoint &point)
\overload
- \relates QPoint
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -325,9 +317,8 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator*(double factor, const QPoint &point)
+ \fn QPoint QPoint::operator*(double factor, const QPoint &point)
\overload
- \relates QPoint
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -338,9 +329,8 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator*(int factor, const QPoint &point)
+ \fn QPoint QPoint::operator*(int factor, const QPoint &point)
\overload
- \relates QPoint
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -348,17 +338,15 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator+(const QPoint &point)
- \relates QPoint
+ \fn QPoint QPoint::operator+(const QPoint &point)
\since 5.0
Returns \a point unmodified.
*/
/*!
- \fn const QPoint operator-(const QPoint &point)
+ \fn QPoint QPoint::operator-(const QPoint &point)
\overload
- \relates QPoint
Returns a QPoint object that is formed by changing the sign of
both components of the given \a point.
@@ -382,8 +370,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator/(const QPoint &point, qreal divisor)
- \relates QPoint
+ \fn const QPoint QPoint::operator/(const QPoint &point, qreal divisor)
Returns the QPoint formed by dividing both components of the given \a point
by the given \a divisor.
@@ -688,8 +675,7 @@ size_t qHash(QPoint key, size_t seed) noexcept
*/
/*!
- \fn const QPointF operator+(const QPointF &p1, const QPointF &p2)
- \relates QPointF
+ \fn QPointF QPointF::operator+(const QPointF &p1, const QPointF &p2)
Returns a QPointF object that is the sum of the given points, \a p1
and \a p2; each component is added separately.
@@ -698,8 +684,7 @@ size_t qHash(QPoint key, size_t seed) noexcept
*/
/*!
- \fn const QPointF operator-(const QPointF &p1, const QPointF &p2)
- \relates QPointF
+ \fn QPointF QPointF::operator-(const QPointF &p1, const QPointF &p2)
Returns a QPointF object that is formed by subtracting \a p2 from \a p1;
each component is subtracted separately.
@@ -708,8 +693,7 @@ size_t qHash(QPoint key, size_t seed) noexcept
*/
/*!
- \fn const QPointF operator*(const QPointF &point, qreal factor)
- \relates QPointF
+ \fn QPointF QPointF::operator*(const QPointF &point, qreal factor)
Returns a copy of the given \a point, multiplied by the given \a factor.
@@ -717,8 +701,7 @@ size_t qHash(QPoint key, size_t seed) noexcept
*/
/*!
- \fn const QPointF operator*(qreal factor, const QPointF &point)
- \relates QPointF
+ \fn QPointF QPointF::operator*(qreal factor, const QPointF &point)
\overload
@@ -726,16 +709,14 @@ size_t qHash(QPoint key, size_t seed) noexcept
*/
/*!
- \fn const QPointF operator+(const QPointF &point)
- \relates QPointF
+ \fn QPointF QPointF::operator+(const QPointF &point)
\since 5.0
Returns \a point unmodified.
*/
/*!
- \fn const QPointF operator-(const QPointF &point)
- \relates QPointF
+ \fn QPointF QPointF::operator-(const QPointF &point)
\overload
Returns a QPointF object that is formed by changing the sign of
@@ -745,8 +726,7 @@ size_t qHash(QPoint key, size_t seed) noexcept
*/
/*!
- \fn const QPointF operator/(const QPointF &point, qreal divisor)
- \relates QPointF
+ \fn QPointF QPointF::operator/(const QPointF &point, qreal divisor)
Returns the QPointF object formed by dividing both components of
the given \a point by the given \a divisor.
@@ -773,15 +753,13 @@ size_t qHash(QPoint key, size_t seed) noexcept
*/
/*!
- \fn bool operator==(const QPointF &p1, const QPointF &p2)
- \relates QPointF
+ \fn bool QPointF::operator==(const QPointF &p1, const QPointF &p2)
Returns \c true if \a p1 is equal to \a p2; otherwise returns \c false.
*/
/*!
- \fn bool operator!=(const QPointF &p1, const QPointF &p2);
- \relates QPointF
+ \fn bool QPointF::operator!=(const QPointF &p1, const QPointF &p2);
Returns \c true if \a p1 is not equal to \a p2; otherwise returns \c false.
*/
diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp
index 2cbaae117d..57b2cc0319 100644
--- a/src/corelib/tools/qsize.cpp
+++ b/src/corelib/tools/qsize.cpp
@@ -302,37 +302,32 @@ QSize QSize::scaled(const QSize &s, Qt::AspectRatioMode mode) const noexcept
*/
/*!
- \fn bool operator==(const QSize &s1, const QSize &s2)
- \relates QSize
+ \fn bool QSize::operator==(const QSize &s1, const QSize &s2)
Returns \c true if \a s1 and \a s2 are equal; otherwise returns \c false.
*/
/*!
- \fn bool operator!=(const QSize &s1, const QSize &s2)
- \relates QSize
+ \fn bool QSize::operator!=(const QSize &s1, const QSize &s2)
Returns \c true if \a s1 and \a s2 are different; otherwise returns \c false.
*/
/*!
- \fn const QSize operator+(const QSize &s1, const QSize &s2)
- \relates QSize
+ \fn QSize QSize::operator+(const QSize &s1, const QSize &s2)
Returns the sum of \a s1 and \a s2; each component is added separately.
*/
/*!
- \fn const QSize operator-(const QSize &s1, const QSize &s2)
- \relates QSize
+ \fn QSize QSize::operator-(const QSize &s1, const QSize &s2)
Returns \a s2 subtracted from \a s1; each component is subtracted
separately.
*/
/*!
- \fn const QSize operator*(const QSize &size, qreal factor)
- \relates QSize
+ \fn QSize QSize::operator*(const QSize &size, qreal factor)
Multiplies the given \a size by the given \a factor, and returns
the result rounded to the nearest integer.
@@ -341,9 +336,8 @@ QSize QSize::scaled(const QSize &s, Qt::AspectRatioMode mode) const noexcept
*/
/*!
- \fn const QSize operator*(qreal factor, const QSize &size)
+ \fn QSize QSize::operator*(qreal factor, const QSize &size)
\overload
- \relates QSize
Multiplies the given \a size by the given \a factor, and returns
the result rounded to the nearest integer.
@@ -362,8 +356,7 @@ QSize QSize::scaled(const QSize &s, Qt::AspectRatioMode mode) const noexcept
*/
/*!
- \fn const QSize operator/(const QSize &size, qreal divisor)
- \relates QSize
+ \fn QSize QSize::operator/(const QSize &size, qreal divisor)
\overload
Divides the given \a size by the given \a divisor, and returns the
@@ -748,40 +741,35 @@ QSizeF QSizeF::scaled(const QSizeF &s, Qt::AspectRatioMode mode) const noexcept
*/
/*!
- \fn bool operator==(const QSizeF &s1, const QSizeF &s2)
- \relates QSizeF
+ \fn bool QSizeF::operator==(const QSizeF &s1, const QSizeF &s2)
Returns \c true if \a s1 and \a s2 are equal; otherwise returns
false.
*/
/*!
- \fn bool operator!=(const QSizeF &s1, const QSizeF &s2)
- \relates QSizeF
+ \fn bool QSizeF::operator!=(const QSizeF &s1, const QSizeF &s2)
Returns \c true if \a s1 and \a s2 are different; otherwise returns \c false.
*/
/*!
- \fn const QSizeF operator+(const QSizeF &s1, const QSizeF &s2)
- \relates QSizeF
+ \fn QSizeF QSizeF::operator+(const QSizeF &s1, const QSizeF &s2)
Returns the sum of \a s1 and \a s2; each component is added separately.
*/
/*!
- \fn const QSizeF operator-(const QSizeF &s1, const QSizeF &s2)
- \relates QSizeF
+ \fn QSizeF QSizeF::operator-(const QSizeF &s1, const QSizeF &s2)
Returns \a s2 subtracted from \a s1; each component is subtracted
separately.
*/
/*!
- \fn const QSizeF operator*(const QSizeF &size, qreal factor)
+ \fn QSizeF QSizeF::operator*(const QSizeF &size, qreal factor)
\overload
- \relates QSizeF
Multiplies the given \a size by the given \a factor and returns
the result.
@@ -790,10 +778,9 @@ QSizeF QSizeF::scaled(const QSizeF &s, Qt::AspectRatioMode mode) const noexcept
*/
/*!
- \fn const QSizeF operator*(qreal factor, const QSizeF &size)
+ \fn QSizeF QSizeF::operator*(qreal factor, const QSizeF &size)
\overload
- \relates QSizeF
Multiplies the given \a size by the given \a factor and returns
the result.
@@ -811,9 +798,8 @@ QSizeF QSizeF::scaled(const QSizeF &s, Qt::AspectRatioMode mode) const noexcept
*/
/*!
- \fn const QSizeF operator/(const QSizeF &size, qreal divisor)
+ \fn QSizeF QSizeF::operator/(const QSizeF &size, qreal divisor)
- \relates QSizeF
\overload
Divides the given \a size by the given \a divisor and returns the
diff --git a/src/corelib/tools/qtaggedpointer.qdoc b/src/corelib/tools/qtaggedpointer.qdoc
index 303b89232c..27927cff3d 100644
--- a/src/corelib/tools/qtaggedpointer.qdoc
+++ b/src/corelib/tools/qtaggedpointer.qdoc
@@ -123,9 +123,9 @@
*/
/*!
- \fn template <typename T, typename Tag> bool QTaggedPointer<T, Tag>::operator!() const noexcept
+ \fn template <typename T, typename Tag> bool QTaggedPointer<T, Tag>::operator!(QTaggedPointer<T, Tag> pointer) noexcept
- Returns \c true if the pointer is \nullptr.
+ Returns \c true if \a pointer is \nullptr.
*/
/*!
@@ -171,8 +171,7 @@
*/
/*!
- \fn template <typename T, typename Tag> inline bool operator==(QTaggedPointer lhs, QTaggedPointer rhs) noexcept
- \relates QTaggedPointer
+ \fn template <typename T, typename Tag> bool QTaggedPointer<T, Tag>::operator==(QTaggedPointer<T, Tag> lhs, QTaggedPointer<T, Tag> rhs) noexcept
Returns \c true if \a lhs is equal to \a rhs; otherwise returns \c false.
@@ -180,8 +179,7 @@
*/
/*!
- \fn template <typename T, typename Tag> inline bool operator!=(QTaggedPointer lhs, QTaggedPointer rhs) noexcept
- \relates QTaggedPointer
+ \fn template <typename T, typename Tag> bool QTaggedPointer<T, Tag>::operator!=(QTaggedPointer<T, Tag> lhs, QTaggedPointer<T, Tag> rhs) noexcept
Returns \c true if \a lhs is not equal to \a rhs; otherwise returns \c false.
@@ -189,29 +187,25 @@
*/
/*!
- \fn template <typename T, typename Tag> inline bool operator==(QTaggedPointer lhs, std::nullptr_t) noexcept
- \relates QTaggedPointer
+ \fn template <typename T, typename Tag> bool QTaggedPointer<T, Tag>::operator==(QTaggedPointer<T, Tag> lhs, std::nullptr_t) noexcept
Returns \c true if \a lhs refers to \c nullptr.
*/
/*!
- \fn template <typename T, typename Tag> inline bool operator==(std::nullptr_t, QTaggedPointer rhs) noexcept
- \relates QTaggedPointer
+ \fn template <typename T, typename Tag> bool QTaggedPointer<T, Tag>::operator==(std::nullptr_t, QTaggedPointer<T, Tag> rhs) noexcept
Returns \c true if \a rhs refers to \c nullptr.
*/
/*!
- \fn template <typename T, typename Tag> inline bool operator!=(QTaggedPointerlhs, std::nullptr_t) noexcept
- \relates QTaggedPointer
+ \fn template <typename T, typename Tag> bool QTaggedPointer<T, Tag>::operator!=(QTaggedPointer<T, Tag> lhs, std::nullptr_t) noexcept
Returns \c true if \a lhs refers to a valid (i.e. non-null) pointer.
*/
/*!
- \fn template <typename T, typename Tag> inline bool operator!=(std::nullptr_t, QTaggedPointer rhs) noexcept
- \relates QTaggedPointer
+ \fn template <typename T, typename Tag> bool QTaggedPointer<T, Tag>::operator!=(std::nullptr_t, QTaggedPointer<T, Tag> rhs) noexcept
Returns \c true if \a rhs refers to a valid (i.e. non-null) pointer.
*/