summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-23 08:31:30 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-24 14:13:42 +0200
commite5bc777e5051a5b24b5e241072042631bd69fc22 (patch)
tree65647e9c78ac3091e630b1cc5d8511e69149e214 /src/corelib
parentb362c691713722b0ebc00d2fa0df16cd0dd79c7d (diff)
Fix documentation warnings
Declare hidden friends like qdoc expects them, and other signature fixes Document function parameters Remove documentation for removed APIs. Change-Id: I44c1caeed0d40be04612129d074acc30b75f5259 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qpointer.cpp58
-rw-r--r--src/corelib/tools/qtaggedpointer.qdoc2
-rw-r--r--src/corelib/tools/qversionnumber.cpp2
3 files changed, 25 insertions, 37 deletions
diff --git a/src/corelib/kernel/qpointer.cpp b/src/corelib/kernel/qpointer.cpp
index 5f6826b269..737d73c4b8 100644
--- a/src/corelib/kernel/qpointer.cpp
+++ b/src/corelib/kernel/qpointer.cpp
@@ -201,8 +201,7 @@
*/
/*!
- \fn template <class T> bool operator==(const T *o, const QPointer<T> &p)
- \relates QPointer
+ \fn template <typename T, typename X> bool QPointer<T>::operator==(X *o, const QPointer<T> &p)
Equality operator. Returns \c true if \a o and the guarded
pointer \a p are pointing to the same object, otherwise
@@ -210,8 +209,7 @@
*/
/*!
- \fn template <class T> bool operator==(const QPointer<T> &p, const T *o)
- \relates QPointer
+ \fn template <typename T, typename X> bool QPointer<T>::operator==(const QPointer<T> &p, X *o)
Equality operator. Returns \c true if \a o and the guarded
pointer \a p are pointing to the same object, otherwise
@@ -219,74 +217,64 @@
*/
/*!
- \fn template <class T> bool operator==(T *o, const QPointer<T> &p)
- \relates QPointer
+ \fn template <typename T, typename X> bool QPointer<T>::operator==(const QPointer<T> &p1, const QPointer<X> &p2)
- Equality operator. Returns \c true if \a o and the guarded
- pointer \a p are pointing to the same object, otherwise
+ Equality operator. Returns \c true if the guarded pointers \a p1 and \a p2
+ are pointing to the same object, otherwise
returns \c false.
*/
/*!
- \fn template <class T> bool operator==(const QPointer<T> &p, T *o)
- \relates QPointer
+ \fn template <typename T> bool QPointer<T>::operator==(std::nullptr_t, const QPointer<T> &rhs)
- Equality operator. Returns \c true if \a o and the guarded
- pointer \a p are pointing to the same object, otherwise
+ Equality operator. Returns \c true if the pointer guarded by \a rhs
+ is \nullptr, otherwise
returns \c false.
-
*/
/*!
- \fn template <class T> bool operator==(const QPointer<T> &p1, const QPointer<T> &p2)
- \relates QPointer
+ \fn template <typename T> bool QPointer<T>::operator==(const QPointer<T> &lhs, std::nullptr_t)
- Equality operator. Returns \c true if the guarded pointers \a p1 and \a p2
- are pointing to the same object, otherwise
+ Equality operator. Returns \c true if the pointer guarded by \a lhs
+ is \nullptr, otherwise
returns \c false.
-
*/
-
/*!
- \fn template <class T> bool operator!=(const T *o, const QPointer<T> &p)
- \relates QPointer
+ \fn template <typename T, typename X> bool QPointer<T>::operator!=(const QPointer<T> &p, X *o)
Inequality operator. Returns \c true if \a o and the guarded
pointer \a p are not pointing to the same object, otherwise
returns \c false.
*/
/*!
- \fn template <class T> bool operator!=(const QPointer<T> &p, const T *o)
- \relates QPointer
+ \fn template <typename T, typename X> bool QPointer<T>::operator!=(X *o, const QPointer<T> &p)
Inequality operator. Returns \c true if \a o and the guarded
pointer \a p are not pointing to the same object, otherwise
returns \c false.
*/
/*!
- \fn template <class T> bool operator!=(T *o, const QPointer<T> &p)
- \relates QPointer
+ \fn template <typename T, typename X> bool QPointer<T>::operator!=(const QPointer<T> &p1, const QPointer<X> &p2)
- Inequality operator. Returns \c true if \a o and the guarded
- pointer \a p are not pointing to the same object, otherwise
+ Inequality operator. Returns \c true if the guarded pointers \a p1 and
+ \a p2 are not pointing to the same object, otherwise
returns \c false.
*/
/*!
- \fn template <class T> bool operator!=(const QPointer<T> &p, T *o)
- \relates QPointer
+ \fn template <typename T> bool QPointer<T>::operator!=(std::nullptr_t, const QPointer<T> &rhs)
- Inequality operator. Returns \c true if \a o and the guarded
- pointer \a p are not pointing to the same object, otherwise
+ Inequality operator. Returns \c true if the pointer guarded by \a rhs is
+ a valid (ie not \nullptr) pointer, otherwise
returns \c false.
*/
/*!
- \fn template <class T> bool operator!=(const QPointer<T> &p1, const QPointer<T> &p2)
- \relates QPointer
+ \fn template <typename T> bool QPointer<T>::operator!=(const QPointer<T> &lhs, std::nullptr_t)
- Inequality operator. Returns \c true if the guarded pointers \a p1 and
- \a p2 are not pointing to the same object, otherwise
+ Inequality operator. Returns \c true if the pointer guarded by \a lhs is
+ a valid (ie not \nullptr) pointer, otherwise
returns \c false.
*/
+
/*!
\fn template <typename T> QPointer<T> qPointerFromVariant(const QVariant &variant)
diff --git a/src/corelib/tools/qtaggedpointer.qdoc b/src/corelib/tools/qtaggedpointer.qdoc
index 27927cff3d..36e20ecff0 100644
--- a/src/corelib/tools/qtaggedpointer.qdoc
+++ b/src/corelib/tools/qtaggedpointer.qdoc
@@ -153,7 +153,7 @@
*/
/*!
- \fn template <typename T, typename Tag> Tag QTaggedPointer<T, Tag>::pointer() const noexcept
+ \fn template <typename T, typename Tag> T *QTaggedPointer<T, Tag>::data() const noexcept
Returns the pointer stored in the tagged pointer.
*/
diff --git a/src/corelib/tools/qversionnumber.cpp b/src/corelib/tools/qversionnumber.cpp
index f91fa20043..f278243cc9 100644
--- a/src/corelib/tools/qversionnumber.cpp
+++ b/src/corelib/tools/qversionnumber.cpp
@@ -578,7 +578,7 @@ size_t qHash(const QVersionNumber &key, size_t seed)
\fn template<typename Integer> static bool QTypeRevision::isValidSegment(Integer segment)
Returns true if the given number can be used as either major or minor
- version in a QTypeRevision. Valid segments need to be \c {>= 0} and \c {< 255}.
+ version in a QTypeRevision. The valid range for \a segment is \c {>= 0} and \c {< 255}.
*/
/*!