From 6fed5cf4e28927bae88c1f18cad8a3ee0eedbc5b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 21 Jul 2017 12:38:49 +0200 Subject: doc: Add missing template parameters to \fn commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ --- src/corelib/tools/qshareddata.cpp | 126 ++++++++++++------------- src/corelib/tools/qsharedpointer.cpp | 176 +++++++++++++++++------------------ 2 files changed, 151 insertions(+), 151 deletions(-) diff --git a/src/corelib/tools/qshareddata.cpp b/src/corelib/tools/qshareddata.cpp index 14bc70734d..f95d75c4a8 100644 --- a/src/corelib/tools/qshareddata.cpp +++ b/src/corelib/tools/qshareddata.cpp @@ -59,9 +59,9 @@ QT_BEGIN_NAMESPACE Constructs a QSharedData object with a reference count of 0. */ -/*! \fn QSharedData::QSharedData(const QSharedData& other) +/*! \fn QSharedData::QSharedData(const QSharedData& ) Constructs a QSharedData object with reference count 0. - \a other is ignored. + The parameter is ignored. */ /*! @@ -248,86 +248,86 @@ QT_BEGIN_NAMESPACE \internal */ -/*! \fn T& QSharedDataPointer::operator*() +/*! \fn template T& QSharedDataPointer::operator*() Provides access to the shared data object's members. This function calls detach(). */ -/*! \fn const T& QSharedDataPointer::operator*() const +/*! \fn template const T& QSharedDataPointer::operator*() const Provides const access to the shared data object's members. This function does \e not call detach(). */ -/*! \fn T* QSharedDataPointer::operator->() +/*! \fn template T* QSharedDataPointer::operator->() Provides access to the shared data object's members. This function calls detach(). */ -/*! \fn const T* QSharedDataPointer::operator->() const +/*! \fn template const T* QSharedDataPointer::operator->() const Provides const access to the shared data object's members. This function does \e not call detach(). */ -/*! \fn QSharedDataPointer::operator T*() +/*! \fn template QSharedDataPointer::operator T*() Returns a pointer to the shared data object. This function calls detach(). \sa data(), constData() */ -/*! \fn QSharedDataPointer::operator const T*() const +/*! \fn template QSharedDataPointer::operator const T*() const Returns a pointer to the shared data object. This function does \e not call detach(). */ -/*! \fn T* QSharedDataPointer::data() +/*! \fn template T* QSharedDataPointer::data() Returns a pointer to the shared data object. This function calls detach(). \sa constData() */ -/*! \fn const T* QSharedDataPointer::data() const +/*! \fn template const T* QSharedDataPointer::data() const Returns a pointer to the shared data object. This function does \e not call detach(). */ -/*! \fn const T* QSharedDataPointer::constData() const +/*! \fn template const T* QSharedDataPointer::constData() const Returns a const pointer to the shared data object. This function does \e not call detach(). \sa data() */ -/*! \fn void QSharedDataPointer::swap(QSharedDataPointer &other) +/*! \fn template void QSharedDataPointer::swap(QSharedDataPointer &other) Swap this instance's shared data pointer with the shared data pointer in \a other. */ /*! - \fn QSharedDataPointer &QSharedDataPointer::operator=(QSharedDataPointer &&other) + \fn template QSharedDataPointer &QSharedDataPointer::operator=(QSharedDataPointer &&other) Move-assigns \a other to this QSharedDataPointer instance. \since 5.2 */ -/*! \fn bool QSharedDataPointer::operator==(const QSharedDataPointer& other) const +/*! \fn template bool QSharedDataPointer::operator==(const QSharedDataPointer& other) const Returns \c true if \a other and \e this have the same \e{d pointer}. This function does \e not call detach(). */ -/*! \fn bool QSharedDataPointer::operator!=(const QSharedDataPointer& other) const +/*! \fn template bool QSharedDataPointer::operator!=(const QSharedDataPointer& other) const Returns \c true if \a other and \e this do \e not have the same \e{d pointer}. This function does \e not call detach(). */ -/*! \fn QSharedDataPointer::QSharedDataPointer() +/*! \fn template QSharedDataPointer::QSharedDataPointer() Constructs a QSharedDataPointer initialized with a null \e{d pointer}. */ /*! - \fn QSharedDataPointer::QSharedDataPointer(QSharedDataPointer &&o) + \fn template QSharedDataPointer::QSharedDataPointer(QSharedDataPointer &&o) Move-constructs a QSharedDataPointer instance, making it point at the same object that \a o was pointing to. @@ -335,45 +335,45 @@ QT_BEGIN_NAMESPACE \since 5.2 */ -/*! \fn QSharedDataPointer::~QSharedDataPointer() +/*! \fn template QSharedDataPointer::~QSharedDataPointer() Decrements the reference count of the shared data object. If the reference count becomes 0, the shared data object is deleted. \e This is then destroyed. */ -/*! \fn QSharedDataPointer::QSharedDataPointer(T* sharedData) +/*! \fn template QSharedDataPointer::QSharedDataPointer(T* data) Constructs a QSharedDataPointer with \e{d pointer} set to - \a sharedData and increments \a{sharedData}'s reference count. + \a data and increments \a{data}'s reference count. */ -/*! \fn QSharedDataPointer::QSharedDataPointer(const QSharedDataPointer& other) +/*! \fn template QSharedDataPointer::QSharedDataPointer(const QSharedDataPointer& o) Sets the \e{d pointer} of \e this to the \e{d pointer} in - \a other and increments the reference count of the shared + \a o and increments the reference count of the shared data object. */ -/*! \fn QSharedDataPointer& QSharedDataPointer::operator=(const QSharedDataPointer& other) +/*! \fn template QSharedDataPointer& QSharedDataPointer::operator=(const QSharedDataPointer& o) Sets the \e{d pointer} of \e this to the \e{d pointer} of - \a other and increments the reference count of the shared + \a o and increments the reference count of the shared data object. The reference count of the old shared data object of \e this is decremented. If the reference count of the old shared data object becomes 0, the old shared data object is deleted. */ -/*! \fn QSharedDataPointer& QSharedDataPointer::operator=(T* sharedData) - Sets the \e{d pointer} og \e this to \a sharedData and increments - \a{sharedData}'s reference count. The reference count of the old +/*! \fn template QSharedDataPointer& QSharedDataPointer::operator=(T* o) + Sets the \e{d pointer} og \e this to \a o and increments + \a{o}'s reference count. The reference count of the old shared data object of \e this is decremented. If the reference count of the old shared data object becomes 0, the old shared data object is deleted. */ -/*! \fn bool QSharedDataPointer::operator!() const +/*! \fn template bool QSharedDataPointer::operator!() const Returns \c true if the \e{d pointer} of \e this is null. */ -/*! \fn void QSharedDataPointer::detach() +/*! \fn template void QSharedDataPointer::detach() If the shared data object's reference count is greater than 1, this function creates a deep copy of the shared data object and sets the \e{d pointer} of \e this to the copy. @@ -383,7 +383,7 @@ QT_BEGIN_NAMESPACE required. You don't need to call it yourself. */ -/*! \fn T *QSharedDataPointer::clone() +/*! \fn template T *QSharedDataPointer::clone() \since 4.5 Creates and returns a deep copy of the current data. This function @@ -449,71 +449,71 @@ QT_BEGIN_NAMESPACE \sa QSharedData, QSharedDataPointer */ -/*! \fn T& QExplicitlySharedDataPointer::operator*() const +/*! \fn template T& QExplicitlySharedDataPointer::operator*() const Provides access to the shared data object's members. */ -/*! \fn T* QExplicitlySharedDataPointer::operator->() +/*! \fn template T* QExplicitlySharedDataPointer::operator->() Provides access to the shared data object's members. */ -/*! \fn const T* QExplicitlySharedDataPointer::operator->() const +/*! \fn template const T* QExplicitlySharedDataPointer::operator->() const Provides const access to the shared data object's members. */ -/*! \fn T* QExplicitlySharedDataPointer::data() const +/*! \fn template T* QExplicitlySharedDataPointer::data() const Returns a pointer to the shared data object. */ -/*! \fn const T* QExplicitlySharedDataPointer::constData() const +/*! \fn template const T* QExplicitlySharedDataPointer::constData() const Returns a const pointer to the shared data object. \sa data() */ -/*! \fn void QExplicitlySharedDataPointer::swap(QExplicitlySharedDataPointer &other) +/*! \fn template void QExplicitlySharedDataPointer::swap(QExplicitlySharedDataPointer &other) Swap this instance's explicitly shared data pointer with the explicitly shared data pointer in \a other. */ -/*! \fn bool QExplicitlySharedDataPointer::operator==(const QExplicitlySharedDataPointer& other) const +/*! \fn template bool QExplicitlySharedDataPointer::operator==(const QExplicitlySharedDataPointer& other) const Returns \c true if \a other and \e this have the same \e{d pointer}. */ /*! - \fn QExplicitlySharedDataPointer &QExplicitlySharedDataPointer::operator=(QExplicitlySharedDataPointer &&other) + \fn template QExplicitlySharedDataPointer &QExplicitlySharedDataPointer::operator=(QExplicitlySharedDataPointer &&other) Move-assigns \a other to this QExplicitlySharedDataPointer instance. \since 5.2 */ -/*! \fn bool QExplicitlySharedDataPointer::operator==(const T* ptr) const +/*! \fn template bool QExplicitlySharedDataPointer::operator==(const T* ptr) const Returns \c true if the \e{d pointer} of \e this is \a ptr. */ -/*! \fn bool QExplicitlySharedDataPointer::operator!=(const QExplicitlySharedDataPointer& other) const +/*! \fn template bool QExplicitlySharedDataPointer::operator!=(const QExplicitlySharedDataPointer& other) const Returns \c true if \a other and \e this do \e not have the same \e{d pointer}. */ -/*! \fn bool QExplicitlySharedDataPointer::operator!=(const T* ptr) const +/*! \fn template bool QExplicitlySharedDataPointer::operator!=(const T* ptr) const Returns \c true if the \e{d pointer} of \e this is \e not \a ptr. */ -/*! \fn QExplicitlySharedDataPointer::QExplicitlySharedDataPointer() +/*! \fn template QExplicitlySharedDataPointer::QExplicitlySharedDataPointer() Constructs a QExplicitlySharedDataPointer initialized with a null \e{d pointer}. */ -/*! \fn QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() +/*! \fn template QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() Decrements the reference count of the shared data object. If the reference count becomes 0, the shared data object is deleted. \e This is then destroyed. */ /*! - \fn QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(QExplicitlySharedDataPointer &&o) + \fn template QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(QExplicitlySharedDataPointer &&o) Move-constructs a QExplicitlySharedDataPointer instance, making it point at the same object that \a o was pointing to. @@ -521,24 +521,24 @@ QT_BEGIN_NAMESPACE \since 5.2 */ -/*! \fn QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(T* sharedData) +/*! \fn template QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(T* data) Constructs a QExplicitlySharedDataPointer with \e{d pointer} - set to \a sharedData and increments \a{sharedData}'s reference + set to \a data and increments \a{data}'s reference count. */ -/*! \fn QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer& other) +/*! \fn template QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer& o) This standard copy constructor sets the \e {d pointer} of \e this to - the \e {d pointer} in \a other and increments the reference count of + the \e {d pointer} in \a o and increments the reference count of the shared data object. */ -/*! \fn QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer& other) - This copy constructor is different in that it allows \a other to be +/*! \fn template template QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer& o) + This copy constructor is different in that it allows \a o to be a different type of explicitly shared data pointer but one that has a compatible shared data object. - By default, the \e{d pointer} of \a other (of type \c{X *}) gets + By default, the \e{d pointer} of \a o (of type \c{X *}) gets implicitly converted to the type \c{T *}; the result of this conversion is set as the \e{d pointer} of \e{this}, and the reference count of the shared data object is incremented. @@ -546,7 +546,7 @@ QT_BEGIN_NAMESPACE However, if the macro \c{QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST} is defined before including the \c{QExplicitlySharedDataPointer} header, then - the \e{d pointer} of \a other undergoes a \c{static_cast} to the + the \e{d pointer} of \a o undergoes a \c{static_cast} to the type \c{T *}. The result of the cast is then set as the \e{d pointer} of \e{this}, and the reference count of the shared data object is incremented. @@ -566,39 +566,39 @@ QT_BEGIN_NAMESPACE compile without modifications. */ -/*! \fn QExplicitlySharedDataPointer& QExplicitlySharedDataPointer::operator=(const QExplicitlySharedDataPointer& other) +/*! \fn template QExplicitlySharedDataPointer& QExplicitlySharedDataPointer::operator=(const QExplicitlySharedDataPointer& o) Sets the \e{d pointer} of \e this to the \e{d pointer} of - \a other and increments the reference count of the shared + \a o and increments the reference count of the shared data object. The reference count of the old shared data object of \e this is decremented. If the reference count of the old shared data object becomes 0, the old shared data object is deleted. */ -/*! \fn QExplicitlySharedDataPointer& QExplicitlySharedDataPointer::operator=(T* sharedData) - Sets the \e{d pointer} of \e this to \a sharedData and - increments \a{sharedData}'s reference count. The reference +/*! \fn template QExplicitlySharedDataPointer& QExplicitlySharedDataPointer::operator=(T* o) + Sets the \e{d pointer} of \e this to \a o and + increments \a{o}'s reference count. The reference count of the old shared data object of \e this is decremented. If the reference count of the old shared data object becomes 0, the old shared data object is deleted. */ -/*! \fn void QExplicitlySharedDataPointer::reset() +/*! \fn template void QExplicitlySharedDataPointer::reset() Resets \e this to be null. i.e., this function sets the \e{d pointer} of \e this to 0, but first it decrements the reference count of the shared data object and deletes the shared data object if the reference count became 0. */ -/*! \fn QExplicitlySharedDataPointer::operator bool () const +/*! \fn template QExplicitlySharedDataPointer::operator bool () const Returns \c true if the \e{d pointer} of \e this is \e not null. */ -/*! \fn bool QExplicitlySharedDataPointer::operator!() const +/*! \fn template bool QExplicitlySharedDataPointer::operator!() const Returns \c true if the \e{d pointer} of \e this is null. */ -/*! \fn void QExplicitlySharedDataPointer::detach() +/*! \fn template void QExplicitlySharedDataPointer::detach() If the shared data object's reference count is greater than 1, this function creates a deep copy of the shared data object and sets the \e{d pointer} of \e this to the copy. @@ -610,7 +610,7 @@ QT_BEGIN_NAMESPACE everywhere in your code, consider using QSharedDataPointer instead. */ -/*! \fn T *QExplicitlySharedDataPointer::clone() +/*! \fn template T *QExplicitlySharedDataPointer::clone() \since 4.5 Creates and returns a deep copy of the current data. This function @@ -618,7 +618,7 @@ QT_BEGIN_NAMESPACE order to create the new copy. This function uses the \e {operator new} and calls the copy constructor of the type T. - See QSharedDataPointer::clone() for an explanation of how to use it. + See QSharedDataPointer::clone() for an explanation of how to use it. */ /*! 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 QSharedPointer::QSharedPointer() Creates a QSharedPointer that points to null (0). */ /*! - \fn QSharedPointer::~QSharedPointer() + \fn template QSharedPointer::~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 template QSharedPointer::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 template QSharedPointer::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 QSharedPointer::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 template QSharedPointer::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 &other) + \fn template QSharedPointer::QSharedPointer(const QSharedPointer &other) Creates a QSharedPointer object that shares \a other's pointer. @@ -525,7 +525,7 @@ */ /*! - \fn QSharedPointer::QSharedPointer(const QWeakPointer &other) + \fn template QSharedPointer::QSharedPointer(const QWeakPointer &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 &other) + \fn template QSharedPointer &QSharedPointer::operator=(const QSharedPointer &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 &other) + \fn template QSharedPointer &QSharedPointer::operator=(const QWeakPointer &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 &other); + \fn template void QSharedPointer::swap(QSharedPointer &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 T *QSharedPointer::data() const Returns the value of the pointer referenced by this object. @@ -590,7 +590,7 @@ */ /*! - \fn T &QSharedPointer::operator *() const + \fn template T &QSharedPointer::operator *() const Provides access to the shared pointer's members. @@ -598,7 +598,7 @@ */ /*! - \fn T *QSharedPointer::operator ->() const + \fn template T *QSharedPointer::operator ->() const Provides access to the shared pointer's members. @@ -606,14 +606,14 @@ */ /*! - \fn bool QSharedPointer::isNull() const + \fn template bool QSharedPointer::isNull() const Returns \c true if this object is holding a reference to a null pointer. */ /*! - \fn QSharedPointer::operator bool() const + \fn template QSharedPointer::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 bool QSharedPointer::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 QSharedPointer::staticCast() const + \fn template template QSharedPointer QSharedPointer::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 QSharedPointer::dynamicCast() const + \fn template template QSharedPointer QSharedPointer::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 QSharedPointer::constCast() const + \fn template template QSharedPointer QSharedPointer::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 QSharedPointer::objectCast() const + \fn template template QSharedPointer QSharedPointer::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 QSharedPointer::create() + \fn template QSharedPointer QSharedPointer::create() \since 5.1 Creates a QSharedPointer object and allocates a new item of type \tt T. The @@ -712,7 +712,7 @@ */ /*! - \fn QSharedPointer QSharedPointer::create(...) + \fn template QSharedPointer QSharedPointer::create(...) \overload \since 5.1 @@ -737,7 +737,7 @@ */ /*! - \fn QWeakPointer QSharedPointer::toWeakRef() const + \fn template QWeakPointer QSharedPointer::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 void QSharedPointer::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 void QSharedPointer::reset() \since 5.0 Same as clear(). For std::shared_ptr compatibility. */ /*! - \fn void QSharedPointer::reset(T *t) + \fn template void QSharedPointer::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 template void QSharedPointer::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 other(t, deleter); this->swap(other); \endcode */ /*! - \fn QWeakPointer::QWeakPointer() + \fn template QWeakPointer::QWeakPointer() Creates a QWeakPointer that points to nothing. */ /*! - \fn QWeakPointer::~QWeakPointer() + \fn template QWeakPointer::~QWeakPointer() Destroys this QWeakPointer object. The pointer referenced by this object will not be deleted. */ /*! - \fn QWeakPointer::QWeakPointer(const QWeakPointer &other) + \fn template QWeakPointer::QWeakPointer(const QWeakPointer &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 &other) + \fn template QWeakPointer::QWeakPointer(const QSharedPointer &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 QWeakPointer::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 QWeakPointer &QWeakPointer::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 &other) + \fn template QWeakPointer &QWeakPointer::operator=(const QWeakPointer &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 &other) + \fn template QWeakPointer &QWeakPointer::operator=(const QSharedPointer &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 &other) + \fn template void QWeakPointer::swap(QWeakPointer &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 bool QWeakPointer::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 QWeakPointer::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 bool QWeakPointer::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 T *QWeakPointer::data() const \since 4.6 Returns the value of the pointer being tracked by this QWeakPointer, @@ -969,7 +969,7 @@ */ /*! - \fn QSharedPointer QWeakPointer::toStrongRef() const + \fn template QSharedPointer QWeakPointer::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 QWeakPointer::lock() const + \fn template QSharedPointer QWeakPointer::lock() const \since 5.4 Same as toStrongRef(). @@ -1011,14 +1011,14 @@ */ /*! - \fn void QWeakPointer::clear() + \fn template void QWeakPointer::clear() Clears this QWeakPointer object, dropping the reference that it may have had to the pointer. */ /*! - \fn QSharedPointer QEnableSharedFromThis::sharedFromThis() + \fn template QSharedPointer QEnableSharedFromThis::sharedFromThis() \since 5.4 If \c this (that is, the subclass instance invoking this method) is being @@ -1027,7 +1027,7 @@ */ /*! - \fn QSharedPointer QEnableSharedFromThis::sharedFromThis() const + \fn template QSharedPointer QEnableSharedFromThis::sharedFromThis() const \overload \since 5.4 @@ -1035,7 +1035,7 @@ */ /*! - \fn bool operator==(const QSharedPointer &ptr1, const QSharedPointer &ptr2) + \fn template template bool operator==(const QSharedPointer &ptr1, const QSharedPointer &ptr2) \relates QSharedPointer Returns \c true if the pointer referenced by \a ptr1 is the @@ -1049,7 +1049,7 @@ */ /*! - \fn bool operator!=(const QSharedPointer &ptr1, const QSharedPointer &ptr2) + \fn template template bool operator!=(const QSharedPointer &ptr1, const QSharedPointer &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 &ptr1, const X *ptr2) + \fn template template bool operator==(const QSharedPointer &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 &ptr1, const X *ptr2) + \fn template template bool operator!=(const QSharedPointer &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 &ptr2) + \fn template template bool operator==(const T *ptr1, const QSharedPointer &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 &ptr2) + \fn template template bool operator!=(const T *ptr1, const QSharedPointer &ptr2) \relates QSharedPointer Returns \c true if the pointer \a ptr1 is not the @@ -1119,7 +1119,7 @@ */ /*! - \fn bool operator==(const QSharedPointer &ptr1, const QWeakPointer &ptr2) + \fn template template bool operator==(const QSharedPointer &ptr1, const QWeakPointer &ptr2) \relates QWeakPointer Returns \c true if the pointer referenced by \a ptr1 is the @@ -1133,7 +1133,7 @@ */ /*! - \fn bool operator!=(const QSharedPointer &ptr1, const QWeakPointer &ptr2) + \fn template template bool operator!=(const QSharedPointer &ptr1, const QWeakPointer &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 &ptr1, const QSharedPointer &ptr2) + \fn template template bool operator==(const QWeakPointer &ptr1, const QSharedPointer &ptr2) \relates QWeakPointer Returns \c true if the pointer referenced by \a ptr1 is the @@ -1161,7 +1161,7 @@ */ /*! - \fn bool operator==(const QSharedPointer &lhs, std::nullptr_t) + \fn template bool operator==(const QSharedPointer &lhs, std::nullptr_t) \relates QSharedPointer \since 5.8 @@ -1171,7 +1171,7 @@ */ /*! - \fn bool operator==(std::nullptr_t, const QSharedPointer &rhs) + \fn template bool operator==(std::nullptr_t, const QSharedPointer &rhs) \relates QSharedPointer \since 5.8 @@ -1181,7 +1181,7 @@ */ /*! - \fn bool operator!=(const QSharedPointer &lhs, std::nullptr_t) + \fn template bool operator!=(const QSharedPointer &lhs, std::nullptr_t) \relates QSharedPointer \since 5.8 @@ -1192,7 +1192,7 @@ */ /*! - \fn bool operator!=(std::nullptr_t, const QSharedPointer &rhs) + \fn template bool operator!=(std::nullptr_t, const QSharedPointer &rhs) \relates QSharedPointer \since 5.8 @@ -1203,7 +1203,7 @@ */ /*! - \fn bool operator==(const QWeakPointer &lhs, std::nullptr_t) + \fn template bool operator==(const QWeakPointer &lhs, std::nullptr_t) \relates QWeakPointer \since 5.8 @@ -1213,7 +1213,7 @@ */ /*! - \fn bool operator==(std::nullptr_t, const QWeakPointer &rhs) + \fn template bool operator==(std::nullptr_t, const QWeakPointer &rhs) \relates QWeakPointer \since 5.8 @@ -1223,7 +1223,7 @@ */ /*! - \fn bool operator!=(const QWeakPointer &lhs, std::nullptr_t) + \fn template bool operator!=(const QWeakPointer &lhs, std::nullptr_t) \relates QWeakPointer \since 5.8 @@ -1234,7 +1234,7 @@ */ /*! - \fn bool operator!=(std::nullptr_t, const QWeakPointer &rhs) + \fn template bool operator!=(std::nullptr_t, const QWeakPointer &rhs) \relates QWeakPointer \since 5.8 @@ -1245,7 +1245,7 @@ */ /*! - \fn bool operator!=(const QWeakPointer &ptr1, const QSharedPointer &ptr2) + \fn template template bool operator!=(const QWeakPointer &ptr1, const QSharedPointer &ptr2) \relates QWeakPointer Returns \c true if the pointer referenced by \a ptr1 is not the @@ -1259,7 +1259,7 @@ */ /*! - \fn QSharedPointer qSharedPointerCast(const QSharedPointer &other) + \fn template template QSharedPointer qSharedPointerCast(const QSharedPointer &other) \relates QSharedPointer Returns a shared pointer to the pointer held by \a other, cast to @@ -1274,7 +1274,7 @@ */ /*! - \fn QSharedPointer qSharedPointerCast(const QWeakPointer &other) + \fn template template QSharedPointer qSharedPointerCast(const QWeakPointer &other) \relates QSharedPointer \relates QWeakPointer @@ -1295,10 +1295,10 @@ */ /*! - \fn QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &other) + \fn template template QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &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 qSharedPointerDynamicCast(const QWeakPointer &other) + \fn template template QSharedPointer qSharedPointerDynamicCast(const QWeakPointer &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 qSharedPointerConstCast(const QSharedPointer &other) + \fn template template QSharedPointer qSharedPointerConstCast(const QSharedPointer &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 qSharedPointerConstCast(const QWeakPointer &other) + \fn template template QSharedPointer qSharedPointerConstCast(const QWeakPointer &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 qSharedPointerObjectCast(const QSharedPointer &other) + \fn template template QSharedPointer qSharedPointerObjectCast(const QSharedPointer &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 qSharedPointerObjectCast(const QWeakPointer &other) + \fn template template QSharedPointer qSharedPointerObjectCast(const QWeakPointer &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 qWeakPointerCast(const QWeakPointer &other) + \fn template template QWeakPointer qWeakPointerCast(const QWeakPointer &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. -- cgit v1.2.3