summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
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/kernel
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/kernel')
-rw-r--r--src/corelib/kernel/qdeadlinetimer.cpp24
-rw-r--r--src/corelib/kernel/qmetatype.cpp6
-rw-r--r--src/corelib/kernel/qvariant.cpp45
3 files changed, 21 insertions, 54 deletions
diff --git a/src/corelib/kernel/qdeadlinetimer.cpp b/src/corelib/kernel/qdeadlinetimer.cpp
index 0ca052764a..0fcfffd98f 100644
--- a/src/corelib/kernel/qdeadlinetimer.cpp
+++ b/src/corelib/kernel/qdeadlinetimer.cpp
@@ -873,8 +873,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep
*/
/*!
- \fn bool operator==(QDeadlineTimer d1, QDeadlineTimer d2)
- \relates QDeadlineTimer
+ \fn bool QDeadlineTimer::operator==(QDeadlineTimer d1, QDeadlineTimer::QDeadlineTimer d2)
Returns true if the deadline on \a d1 and the deadline in \a d2 are the
same, false otherwise. The timer type used to create the two deadlines is
@@ -887,8 +886,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep
*/
/*!
- \fn bool operator!=(QDeadlineTimer d1, QDeadlineTimer d2)
- \relates QDeadlineTimer
+ \fn bool QDeadlineTimer::operator!=(QDeadlineTimer d1, QDeadlineTimer d2)
Returns true if the deadline on \a d1 and the deadline in \a d2 are
diferent, false otherwise. The timer type used to create the two deadlines
@@ -901,8 +899,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep
*/
/*!
- \fn bool operator<(QDeadlineTimer d1, QDeadlineTimer d2)
- \relates QDeadlineTimer
+ \fn bool QDeadlineTimer::operator<(QDeadlineTimer d1, QDeadlineTimer d2)
Returns true if the deadline on \a d1 is earlier than the deadline in \a
d2, false otherwise. The timer type used to create the two deadlines is
@@ -915,8 +912,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep
*/
/*!
- \fn bool operator<=(QDeadlineTimer d1, QDeadlineTimer d2)
- \relates QDeadlineTimer
+ \fn bool QDeadlineTimer::operator<=(QDeadlineTimer d1, QDeadlineTimer d2)
Returns true if the deadline on \a d1 is earlier than or the same as the
deadline in \a d2, false otherwise. The timer type used to create the two
@@ -929,8 +925,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep
*/
/*!
- \fn bool operator>(QDeadlineTimer d1, QDeadlineTimer d2)
- \relates QDeadlineTimer
+ \fn bool QDeadlineTimer::operator>(QDeadlineTimer d1, QDeadlineTimer d2)
Returns true if the deadline on \a d1 is later than the deadline in \a
d2, false otherwise. The timer type used to create the two deadlines is
@@ -943,8 +938,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep
*/
/*!
- \fn bool operator>=(QDeadlineTimer d1, QDeadlineTimer d2)
- \relates QDeadlineTimer
+ \fn bool QDeadlineTimer::operator>=(QDeadlineTimer d1, QDeadlineTimer d2)
Returns true if the deadline on \a d1 is later than or the same as the
deadline in \a d2, false otherwise. The timer type used to create the two
@@ -981,8 +975,7 @@ QDeadlineTimer operator+(QDeadlineTimer dt, qint64 msecs)
}
/*!
- \fn QDeadlineTimer operator+(qint64 msecs, QDeadlineTimer dt)
- \relates QDeadlineTimer
+ \fn QDeadlineTimer QDeadlineTimer::operator+(qint64 msecs, QDeadlineTimer dt)
Returns a QDeadlineTimer object whose deadline is \a msecs later than the
deadline stored in \a dt. If \a dt is set to never expire, this function
@@ -992,8 +985,7 @@ QDeadlineTimer operator+(QDeadlineTimer dt, qint64 msecs)
*/
/*!
- \fn QDeadlineTimer operator-(QDeadlineTimer dt, qint64 msecs)
- \relates QDeadlineTimer
+ \fn QDeadlineTimer QDeadlineTimer::operator-(QDeadlineTimer dt, qint64 msecs)
Returns a QDeadlineTimer object whose deadline is \a msecs before the
deadline stored in \a dt. If \a dt is set to never expire, this function
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index d9de26141c..307dc7a58d 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -804,18 +804,16 @@ void QMetaType::unregisterMetaType(QMetaType type)
Returns the QMetaType corresponding to the type in the template parameter.
*/
-/*! \fn bool operator==(QMetaType a, QMetaType b)
+/*! \fn bool QMetaType::operator==(QMetaType a, QMetaType b)
\since 5.15
- \relates QMetaType
\overload
Returns \c true if the QMetaType \a a represents the same type
as the QMetaType \a b, otherwise returns \c false.
*/
-/*! \fn bool operator!=(QMetaType a, QMetaType b)
+/*! \fn bool QMetaType::operator!=(QMetaType a, QMetaType b)
\since 5.15
- \relates QMetaType
\overload
Returns \c true if the QMetaType \a a represents a different type
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 849ed6e6ef..cd2004680b 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -2064,38 +2064,12 @@ bool QVariant::view(int type, void *ptr)
}
/*!
- \fn bool operator==(const QVariant &v1, const QVariant &v2)
-
- \relates QVariant
+ \fn bool QVariant::operator==(const QVariant &v1, const QVariant &v2)
Returns \c true if \a v1 and \a v2 are equal; otherwise returns \c false.
- If \a v1 and \a v2 have the same \l{QVariant::}{type()}, the
- type's equality operator is used for comparison. If not, it is
- attempted to \l{QVariant::}{convert()} \a v2 to the same type as
- \a v1. See \l{QVariant::}{canConvert()} for a list of possible
- conversions.
-
- The result of the function is not affected by the result of QVariant::isNull,
- which means that two values can be equal even if one of them is null and
- another is not.
-*/
-
-/*!
- \fn bool operator!=(const QVariant &v1, const QVariant &v2)
-
- \relates QVariant
-
- Returns \c false if \a v1 and \a v2 are equal; otherwise returns \c true.
-*/
-
-/*! \fn bool QVariant::operator==(const QVariant &v) const
-
- Compares this QVariant with \a v and returns \c true if they are
- equal; otherwise returns \c false.
-
- QVariant uses the equality operator of the type() it contains to
- check for equality.
+ QVariant uses the equality operator of the type() contained to check for
+ equality.
Variants of different types will always compare as not equal with a few
exceptions:
@@ -2109,16 +2083,19 @@ bool QVariant::view(int type, void *ptr)
\li If both variants contain pointers to QObject derived types, QVariant
will check whether the types are related and point to the same object.
\endlist
+
+ The result of the function is not affected by the result of QVariant::isNull,
+ which means that two values can be equal even if one of them is null and
+ another is not.
*/
/*!
- \fn bool QVariant::operator!=(const QVariant &v) const
+ \fn bool QVariant::operator!=(const QVariant &v1, const QVariant &v2)
- Compares this QVariant with \a v and returns \c true if they are not
- equal; otherwise returns \c false.
+ Returns \c false if \a v1 and \a v2 are equal; otherwise returns \c true.
- QVariant uses the equality operator of the type() it contains to
- check for equality.
+ QVariant uses the equality operator of the type() contained to check for
+ equality.
Variants of different types will always compare as not equal with a few
exceptions: