summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsharedpointer.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2017-07-21 12:38:49 +0200
committerMartin Smith <martin.smith@qt.io>2017-12-06 10:04:28 +0000
commit6fed5cf4e28927bae88c1f18cad8a3ee0eedbc5b (patch)
tree3a571b07ce1f57ddda6424fb8fd2d28a74b2b4f3 /src/corelib/tools/qsharedpointer.cpp
parentaefb3a9a076a6df1076cf8bf4f2a3b0c8993f6ee (diff)
doc: Add missing template parameters to \fn commands
This update corrects many qdoc warnings in qsharedpointer.cpp and qshareddata.cpp caused by incomplete \fn commands. Template stuff was added to the \fn commands. Change-Id: Ic10bcf04477d5f3d5380aeb1e58050a88f03005a Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/corelib/tools/qsharedpointer.cpp')
-rw-r--r--src/corelib/tools/qsharedpointer.cpp176
1 files changed, 88 insertions, 88 deletions
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index cc129595e4..756e7bb59b 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -429,20 +429,20 @@
*/
/*!
- \fn QSharedPointer::QSharedPointer()
+ \fn template <class T> QSharedPointer<T>::QSharedPointer()
Creates a QSharedPointer that points to null (0).
*/
/*!
- \fn QSharedPointer::~QSharedPointer()
+ \fn template <class T> QSharedPointer<T>::~QSharedPointer()
Destroys this QSharedPointer object. If it is the last reference to
the pointer stored, this will delete the pointer as well.
*/
/*!
- \fn QSharedPointer::QSharedPointer(X *ptr)
+ \fn template <class T> template <typename X> QSharedPointer<T>::QSharedPointer(X *ptr)
Creates a QSharedPointer that points to \a ptr. The pointer \a ptr
becomes managed by this QSharedPointer and must not be passed to
@@ -455,13 +455,13 @@
*/
/*!
- \fn QSharedPointer::QSharedPointer(X *ptr, Deleter deleter)
+ \fn template <class T> template <typename X, typename Deleter> QSharedPointer<T>::QSharedPointer(X *ptr, Deleter d)
Creates a QSharedPointer that points to \a ptr. The pointer \a ptr
becomes managed by this QSharedPointer and must not be passed to
another QSharedPointer object or deleted outside this object.
- The \a deleter parameter specifies the custom deleter for this
+ The deleter parameter \a d specifies the custom deleter for this
object. The custom deleter is called, instead of the operator delete(),
when the strong reference count drops to 0. This is useful,
for instance, for calling \l {QObject::}{deleteLater()} on a QObject instead:
@@ -495,7 +495,7 @@
*/
/*!
- \fn QSharedPointer::QSharedPointer(std::nullptr_t)
+ \fn template <class T> QSharedPointer<T>::QSharedPointer(std::nullptr_t)
\since 5.8
Creates a QSharedPointer that is null. This is equivalent to the
@@ -503,19 +503,19 @@
*/
/*!
- \fn QSharedPointer::QSharedPointer(std::nullptr_t, Deleter deleter)
+ \fn template <class T> template <typename Deleter> QSharedPointer<T>::QSharedPointer(std::nullptr_t, Deleter d)
\since 5.8
Creates a QSharedPointer that is null. This is equivalent to the
QSharedPointer default constructor.
- The \a deleter parameter specifies the custom deleter for this
+ The deleter parameter \a d specifies the custom deleter for this
object. The custom deleter is called, instead of the operator
delete(), when the strong reference count drops to 0.
*/
/*!
- \fn QSharedPointer::QSharedPointer(const QSharedPointer<T> &other)
+ \fn template <class T> QSharedPointer<T>::QSharedPointer(const QSharedPointer<T> &other)
Creates a QSharedPointer object that shares \a other's pointer.
@@ -525,7 +525,7 @@
*/
/*!
- \fn QSharedPointer::QSharedPointer(const QWeakPointer<T> &other)
+ \fn template <class T> QSharedPointer<T>::QSharedPointer(const QWeakPointer<T> &other)
Creates a QSharedPointer by promoting the weak reference \a other
to strong reference and sharing its pointer.
@@ -538,7 +538,7 @@
*/
/*!
- \fn QSharedPointer &QSharedPointer::operator=(const QSharedPointer<T> &other)
+ \fn template <class T> QSharedPointer &QSharedPointer<T>::operator=(const QSharedPointer<T> &other)
Makes this object share \a other's pointer. The current pointer
reference is discarded and, if it was the last, the pointer will
@@ -550,7 +550,7 @@
*/
/*!
- \fn QSharedPointer &QSharedPointer::operator=(const QWeakPointer<T> &other)
+ \fn template <class T> QSharedPointer &QSharedPointer<T>::operator=(const QWeakPointer<T> &other)
Promotes \a other to a strong reference and makes this object
share a reference to the pointer referenced by it. The current pointer
@@ -563,7 +563,7 @@
*/
/*!
- \fn void QSharedPointer::swap(QSharedPointer<T> &other);
+ \fn template <class T> void QSharedPointer<T>::swap(QSharedPointer<T> &other);
\since 5.3
Swaps this shared pointer instance with \a other. This function is
@@ -571,7 +571,7 @@
*/
/*!
- \fn T *QSharedPointer::data() const
+ \fn template <class T> T *QSharedPointer<T>::data() const
Returns the value of the pointer referenced by this object.
@@ -590,7 +590,7 @@
*/
/*!
- \fn T &QSharedPointer::operator *() const
+ \fn template <class T> T &QSharedPointer<T>::operator *() const
Provides access to the shared pointer's members.
@@ -598,7 +598,7 @@
*/
/*!
- \fn T *QSharedPointer::operator ->() const
+ \fn template <class T> T *QSharedPointer<T>::operator ->() const
Provides access to the shared pointer's members.
@@ -606,14 +606,14 @@
*/
/*!
- \fn bool QSharedPointer::isNull() const
+ \fn template <class T> bool QSharedPointer<T>::isNull() const
Returns \c true if this object is holding a reference to a null
pointer.
*/
/*!
- \fn QSharedPointer::operator bool() const
+ \fn template <class T> QSharedPointer<T>::operator bool() const
Returns \c true if this object is not null. This function is suitable
for use in \tt if-constructs, like:
@@ -626,7 +626,7 @@
*/
/*!
- \fn bool QSharedPointer::operator !() const
+ \fn template <class T> bool QSharedPointer<T>::operator !() const
Returns \c true if this object is null. This function is suitable
for use in \tt if-constructs, like:
@@ -639,7 +639,7 @@
*/
/*!
- \fn QSharedPointer<X> QSharedPointer::staticCast() const
+ \fn template <class T> template <class X> QSharedPointer<X> QSharedPointer<T>::staticCast() const
Performs a static cast from this pointer's type to \tt X and returns
a QSharedPointer that shares the reference. This function can be
@@ -654,7 +654,7 @@
*/
/*!
- \fn QSharedPointer<X> QSharedPointer::dynamicCast() const
+ \fn template <class T> template <class X> QSharedPointer<X> QSharedPointer<T>::dynamicCast() const
Performs a dynamic cast from this pointer's type to \tt X and
returns a QSharedPointer that shares the reference. If this
@@ -671,7 +671,7 @@
*/
/*!
- \fn QSharedPointer<X> QSharedPointer::constCast() const
+ \fn template <class T> template <class X> QSharedPointer<X> QSharedPointer<T>::constCast() const
Performs a \tt const_cast from this pointer's type to \tt X and returns
a QSharedPointer that shares the reference. This function can be
@@ -682,7 +682,7 @@
*/
/*!
- \fn QSharedPointer<X> QSharedPointer::objectCast() const
+ \fn template <class T> template <class X> QSharedPointer<X> QSharedPointer<T>::objectCast() const
\since 4.6
Performs a \l qobject_cast() from this pointer's type to \tt X and
@@ -700,7 +700,7 @@
*/
/*!
- \fn QSharedPointer<T> QSharedPointer::create()
+ \fn template <class T> QSharedPointer<T> QSharedPointer<T>::create()
\since 5.1
Creates a QSharedPointer object and allocates a new item of type \tt T. The
@@ -712,7 +712,7 @@
*/
/*!
- \fn QSharedPointer<T> QSharedPointer::create(...)
+ \fn template <class T> QSharedPointer<T> QSharedPointer<T>::create(...)
\overload
\since 5.1
@@ -737,7 +737,7 @@
*/
/*!
- \fn QWeakPointer<T> QSharedPointer::toWeakRef() const
+ \fn template <class T> QWeakPointer<T> QSharedPointer<T>::toWeakRef() const
Returns a weak reference object that shares the pointer referenced
by this object.
@@ -746,7 +746,7 @@
*/
/*!
- \fn void QSharedPointer::clear()
+ \fn template <class T> void QSharedPointer<T>::clear()
Clears this QSharedPointer object, dropping the reference that it
may have had to the pointer. If this was the last reference, then
@@ -754,14 +754,14 @@
*/
/*!
- \fn void QSharedPointer::reset()
+ \fn template <class T> void QSharedPointer<T>::reset()
\since 5.0
Same as clear(). For std::shared_ptr compatibility.
*/
/*!
- \fn void QSharedPointer::reset(T *t)
+ \fn template <class T> void QSharedPointer<T>::reset(T *t)
\since 5.0
Resets this QSharedPointer object to point to \a t
@@ -772,31 +772,31 @@
*/
/*!
- \fn void QSharedPointer::reset(T *t, Deleter deleter)
+ \fn template <class T> template <typename Deleter> void QSharedPointer<T>::reset(T *t, Deleter deleter)
\since 5.0
Resets this QSharedPointer object to point to \a t
- instead, with deleter \a deleter. Equivalent to:
+ instead, with the Deleter \a deleter. Equivalent to:
\code
QSharedPointer<T> other(t, deleter); this->swap(other);
\endcode
*/
/*!
- \fn QWeakPointer::QWeakPointer()
+ \fn template <class T> QWeakPointer<T>::QWeakPointer()
Creates a QWeakPointer that points to nothing.
*/
/*!
- \fn QWeakPointer::~QWeakPointer()
+ \fn template <class T> QWeakPointer<T>::~QWeakPointer()
Destroys this QWeakPointer object. The pointer referenced
by this object will not be deleted.
*/
/*!
- \fn QWeakPointer::QWeakPointer(const QWeakPointer<T> &other)
+ \fn template <class T> QWeakPointer<T>::QWeakPointer(const QWeakPointer<T> &other)
Creates a QWeakPointer that holds a weak reference to the
pointer referenced by \a other.
@@ -807,7 +807,7 @@
*/
/*!
- \fn QWeakPointer::QWeakPointer(const QSharedPointer<T> &other)
+ \fn template <class T> QWeakPointer<T>::QWeakPointer(const QSharedPointer<T> &other)
Creates a QWeakPointer that holds a weak reference to the
pointer referenced by \a other.
@@ -818,12 +818,12 @@
*/
/*!
- \fn QWeakPointer::QWeakPointer(const QObject *obj)
+ \fn template <class T> QWeakPointer<T>::QWeakPointer(const QObject *other)
\since 4.6
\deprecated
Creates a QWeakPointer that holds a weak reference directly to the
- QObject \a obj. This constructor is only available if the template type
+ QObject \a other. This constructor is only available if the template type
\tt T is QObject or derives from it (otherwise a compilation error will
result).
@@ -837,19 +837,19 @@
*/
/*!
- \fn QWeakPointer &QWeakPointer::operator=(const QObject *obj)
+ \fn template <class T> QWeakPointer &QWeakPointer<T>::operator=(const QObject *other)
\since 4.6
\deprecated
Makes this QWeakPointer hold a weak reference directly to the QObject
- \a obj. This function is only available if the template type \tt T is
+ \a other. This function is only available if the template type \tt T is
QObject or derives from it.
\sa QPointer
*/
/*!
- \fn QWeakPointer &QWeakPointer::operator=(const QWeakPointer<T> &other)
+ \fn template <class T> QWeakPointer &QWeakPointer<T>::operator=(const QWeakPointer<T> &other)
Makes this object share \a other's pointer. The current pointer
reference is discarded but is not deleted.
@@ -860,7 +860,7 @@
*/
/*!
- \fn QWeakPointer &QWeakPointer::operator=(const QSharedPointer<T> &other)
+ \fn template <class T> QWeakPointer &QWeakPointer<T>::operator=(const QSharedPointer<T> &other)
Makes this object share \a other's pointer. The current pointer
reference is discarded but is not deleted.
@@ -871,7 +871,7 @@
*/
/*!
- \fn void QWeakPointer::swap(QWeakPointer<T> &other)
+ \fn template <class T> void QWeakPointer<T>::swap(QWeakPointer<T> &other)
\since 5.4
Swaps this weak pointer instance with \a other. This function is
@@ -879,7 +879,7 @@
*/
/*!
- \fn bool QWeakPointer::isNull() const
+ \fn template <class T> bool QWeakPointer<T>::isNull() const
Returns \c true if this object is holding a reference to a null
pointer.
@@ -891,7 +891,7 @@
*/
/*!
- \fn QWeakPointer::operator bool() const
+ \fn template <class T> QWeakPointer<T>::operator bool() const
Returns \c true if this object is not null. This function is suitable
for use in \tt if-constructs, like:
@@ -909,7 +909,7 @@
*/
/*!
- \fn bool QWeakPointer::operator !() const
+ \fn template <class T> bool QWeakPointer<T>::operator !() const
Returns \c true if this object is null. This function is suitable
for use in \tt if-constructs, like:
@@ -927,7 +927,7 @@
*/
/*!
- \fn T *QWeakPointer::data() const
+ \fn template <class T> T *QWeakPointer<T>::data() const
\since 4.6
Returns the value of the pointer being tracked by this QWeakPointer,
@@ -969,7 +969,7 @@
*/
/*!
- \fn QSharedPointer<T> QWeakPointer::toStrongRef() const
+ \fn template <class T> QSharedPointer<T> QWeakPointer<T>::toStrongRef() const
Promotes this weak reference to a strong one and returns a
QSharedPointer object holding that reference. When promoting to
@@ -1002,7 +1002,7 @@
*/
/*!
- \fn QSharedPointer<T> QWeakPointer::lock() const
+ \fn template <class T> QSharedPointer<T> QWeakPointer<T>::lock() const
\since 5.4
Same as toStrongRef().
@@ -1011,14 +1011,14 @@
*/
/*!
- \fn void QWeakPointer::clear()
+ \fn template <class T> void QWeakPointer<T>::clear()
Clears this QWeakPointer object, dropping the reference that it
may have had to the pointer.
*/
/*!
- \fn QSharedPointer<T> QEnableSharedFromThis::sharedFromThis()
+ \fn template <class T> QSharedPointer<T> QEnableSharedFromThis<T>::sharedFromThis()
\since 5.4
If \c this (that is, the subclass instance invoking this method) is being
@@ -1027,7 +1027,7 @@
*/
/*!
- \fn QSharedPointer<const T> QEnableSharedFromThis::sharedFromThis() const
+ \fn template <class T> QSharedPointer<const T> QEnableSharedFromThis<T>::sharedFromThis() const
\overload
\since 5.4
@@ -1035,7 +1035,7 @@
*/
/*!
- \fn bool operator==(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+ \fn template <class T> template <class X> bool operator==(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
\relates QSharedPointer
Returns \c true if the pointer referenced by \a ptr1 is the
@@ -1049,7 +1049,7 @@
*/
/*!
- \fn bool operator!=(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+ \fn template <class T> template <class X> bool operator!=(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
\relates QSharedPointer
Returns \c true if the pointer referenced by \a ptr1 is not the
@@ -1063,7 +1063,7 @@
*/
/*!
- \fn bool operator==(const QSharedPointer<T> &ptr1, const X *ptr2)
+ \fn template <class T> template <class X> bool operator==(const QSharedPointer<T> &ptr1, const X *ptr2)
\relates QSharedPointer
Returns \c true if the pointer referenced by \a ptr1 is the
@@ -1077,7 +1077,7 @@
*/
/*!
- \fn bool operator!=(const QSharedPointer<T> &ptr1, const X *ptr2)
+ \fn template <class T> template <class X> bool operator!=(const QSharedPointer<T> &ptr1, const X *ptr2)
\relates QSharedPointer
Returns \c true if the pointer referenced by \a ptr1 is not the
@@ -1091,7 +1091,7 @@
*/
/*!
- \fn bool operator==(const T *ptr1, const QSharedPointer<X> &ptr2)
+ \fn template <class T> template <class X> bool operator==(const T *ptr1, const QSharedPointer<X> &ptr2)
\relates QSharedPointer
Returns \c true if the pointer \a ptr1 is the
@@ -1105,7 +1105,7 @@
*/
/*!
- \fn bool operator!=(const T *ptr1, const QSharedPointer<X> &ptr2)
+ \fn template <class T> template <class X> bool operator!=(const T *ptr1, const QSharedPointer<X> &ptr2)
\relates QSharedPointer
Returns \c true if the pointer \a ptr1 is not the
@@ -1119,7 +1119,7 @@
*/
/*!
- \fn bool operator==(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
+ \fn template <class T> template <class X> bool operator==(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
\relates QWeakPointer
Returns \c true if the pointer referenced by \a ptr1 is the
@@ -1133,7 +1133,7 @@
*/
/*!
- \fn bool operator!=(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
+ \fn template <class T> template <class X> bool operator!=(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
\relates QWeakPointer
Returns \c true if the pointer referenced by \a ptr1 is not the
@@ -1147,7 +1147,7 @@
*/
/*!
- \fn bool operator==(const QWeakPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+ \fn template <class T> template <class X> bool operator==(const QWeakPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
\relates QWeakPointer
Returns \c true if the pointer referenced by \a ptr1 is the
@@ -1161,7 +1161,7 @@
*/
/*!
- \fn bool operator==(const QSharedPointer<T> &lhs, std::nullptr_t)
+ \fn template <class T> bool operator==(const QSharedPointer<T> &lhs, std::nullptr_t)
\relates QSharedPointer
\since 5.8
@@ -1171,7 +1171,7 @@
*/
/*!
- \fn bool operator==(std::nullptr_t, const QSharedPointer<T> &rhs)
+ \fn template <class T> bool operator==(std::nullptr_t, const QSharedPointer<T> &rhs)
\relates QSharedPointer
\since 5.8
@@ -1181,7 +1181,7 @@
*/
/*!
- \fn bool operator!=(const QSharedPointer<T> &lhs, std::nullptr_t)
+ \fn template <class T> bool operator!=(const QSharedPointer<T> &lhs, std::nullptr_t)
\relates QSharedPointer
\since 5.8
@@ -1192,7 +1192,7 @@
*/
/*!
- \fn bool operator!=(std::nullptr_t, const QSharedPointer<T> &rhs)
+ \fn template <class T> bool operator!=(std::nullptr_t, const QSharedPointer<T> &rhs)
\relates QSharedPointer
\since 5.8
@@ -1203,7 +1203,7 @@
*/
/*!
- \fn bool operator==(const QWeakPointer<T> &lhs, std::nullptr_t)
+ \fn template <class T> bool operator==(const QWeakPointer<T> &lhs, std::nullptr_t)
\relates QWeakPointer
\since 5.8
@@ -1213,7 +1213,7 @@
*/
/*!
- \fn bool operator==(std::nullptr_t, const QWeakPointer<T> &rhs)
+ \fn template <class T> bool operator==(std::nullptr_t, const QWeakPointer<T> &rhs)
\relates QWeakPointer
\since 5.8
@@ -1223,7 +1223,7 @@
*/
/*!
- \fn bool operator!=(const QWeakPointer<T> &lhs, std::nullptr_t)
+ \fn template <class T> bool operator!=(const QWeakPointer<T> &lhs, std::nullptr_t)
\relates QWeakPointer
\since 5.8
@@ -1234,7 +1234,7 @@
*/
/*!
- \fn bool operator!=(std::nullptr_t, const QWeakPointer<T> &rhs)
+ \fn template <class T> bool operator!=(std::nullptr_t, const QWeakPointer<T> &rhs)
\relates QWeakPointer
\since 5.8
@@ -1245,7 +1245,7 @@
*/
/*!
- \fn bool operator!=(const QWeakPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+ \fn template <class T> template <class X> bool operator!=(const QWeakPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
\relates QWeakPointer
Returns \c true if the pointer referenced by \a ptr1 is not the
@@ -1259,7 +1259,7 @@
*/
/*!
- \fn QSharedPointer<X> qSharedPointerCast(const QSharedPointer<T> &other)
+ \fn template <class X> template <class T> QSharedPointer<X> qSharedPointerCast(const QSharedPointer<T> &other)
\relates QSharedPointer
Returns a shared pointer to the pointer held by \a other, cast to
@@ -1274,7 +1274,7 @@
*/
/*!
- \fn QSharedPointer<X> qSharedPointerCast(const QWeakPointer<T> &other)
+ \fn template <class X> template <class T> QSharedPointer<X> qSharedPointerCast(const QWeakPointer<T> &other)
\relates QSharedPointer
\relates QWeakPointer
@@ -1295,10 +1295,10 @@
*/
/*!
- \fn QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &other)
+ \fn template <class X> template <class T> QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &src)
\relates QSharedPointer
- Returns a shared pointer to the pointer held by \a other, using a
+ Returns a shared pointer to the pointer held by \a src, using a
dynamic cast to type \tt X to obtain an internal pointer of the
appropriate type. If the \tt dynamic_cast fails, the object
returned will be null.
@@ -1311,16 +1311,16 @@
*/
/*!
- \fn QSharedPointer<X> qSharedPointerDynamicCast(const QWeakPointer<T> &other)
+ \fn template <class X> template <class T> QSharedPointer<X> qSharedPointerDynamicCast(const QWeakPointer<T> &src)
\relates QSharedPointer
\relates QWeakPointer
- Returns a shared pointer to the pointer held by \a other, using a
+ Returns a shared pointer to the pointer held by \a src, using a
dynamic cast to type \tt X to obtain an internal pointer of the
appropriate type. If the \tt dynamic_cast fails, the object
returned will be null.
- The \a other object is converted first to a strong reference. If
+ The \a src object is converted first to a strong reference. If
that conversion fails (because the object it's pointing to has
already been deleted), this function also returns a null
QSharedPointer.
@@ -1333,10 +1333,10 @@
*/
/*!
- \fn QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &other)
+ \fn template <class X> template <class T> QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &src)
\relates QSharedPointer
- Returns a shared pointer to the pointer held by \a other, cast to
+ Returns a shared pointer to the pointer held by \a src, cast to
type \tt X. The types \tt T and \tt X must belong to one
hierarchy for the \tt const_cast to succeed. The \tt const and \tt
volatile differences between \tt T and \tt X are ignored.
@@ -1345,16 +1345,16 @@
*/
/*!
- \fn QSharedPointer<X> qSharedPointerConstCast(const QWeakPointer<T> &other)
+ \fn template <class X> template <class T> QSharedPointer<X> qSharedPointerConstCast(const QWeakPointer<T> &src)
\relates QSharedPointer
\relates QWeakPointer
- Returns a shared pointer to the pointer held by \a other, cast to
+ Returns a shared pointer to the pointer held by \a src, cast to
type \tt X. The types \tt T and \tt X must belong to one
hierarchy for the \tt const_cast to succeed. The \tt const and
\tt volatile differences between \tt T and \tt X are ignored.
- The \a other object is converted first to a strong reference. If
+ The \a src object is converted first to a strong reference. If
that conversion fails (because the object it's pointing to has
already been deleted), this function returns a null
QSharedPointer.
@@ -1363,13 +1363,13 @@
*/
/*!
- \fn QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &other)
+ \fn template <class X> template <class T> QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &src)
\relates QSharedPointer
\since 4.6
\brief The qSharedPointerObjectCast function is for casting a shared pointer.
- Returns a shared pointer to the pointer held by \a other, using a
+ Returns a shared pointer to the pointer held by \a src, using a
\l qobject_cast() to type \tt X to obtain an internal pointer of the
appropriate type. If the \tt qobject_cast fails, the object
returned will be null.
@@ -1382,19 +1382,19 @@
*/
/*!
- \fn QSharedPointer<X> qSharedPointerObjectCast(const QWeakPointer<T> &other)
+ \fn template <class X> template <class T> QSharedPointer<X> qSharedPointerObjectCast(const QWeakPointer<T> &src)
\relates QSharedPointer
\relates QWeakPointer
\since 4.6
\brief The qSharedPointerObjectCast function is for casting a shared pointer.
- Returns a shared pointer to the pointer held by \a other, using a
+ Returns a shared pointer to the pointer held by \a src, using a
\l qobject_cast() to type \tt X to obtain an internal pointer of the
appropriate type. If the \tt qobject_cast fails, the object
returned will be null.
- The \a other object is converted first to a strong reference. If
+ The \a src object is converted first to a strong reference. If
that conversion fails (because the object it's pointing to has
already been deleted), this function also returns a null
QSharedPointer.
@@ -1408,10 +1408,10 @@
/*!
- \fn QWeakPointer<X> qWeakPointerCast(const QWeakPointer<T> &other)
+ \fn template <class X> template <class T> QWeakPointer<X> qWeakPointerCast(const QWeakPointer<T> &src)
\relates QWeakPointer
- Returns a weak pointer to the pointer held by \a other, cast to
+ Returns a weak pointer to the pointer held by \a src, cast to
type \tt X. The types \tt T and \tt X must belong to one
hierarchy for the \tt static_cast to succeed.