summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qshareddata.cpp126
-rw-r--r--src/corelib/tools/qsharedpointer.cpp176
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 <class T> T& QSharedDataPointer<T>::operator*()
Provides access to the shared data object's members.
This function calls detach().
*/
-/*! \fn const T& QSharedDataPointer::operator*() const
+/*! \fn template <class T> const T& QSharedDataPointer<T>::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 <class T> T* QSharedDataPointer<T>::operator->()
Provides access to the shared data object's members.
This function calls detach().
*/
-/*! \fn const T* QSharedDataPointer::operator->() const
+/*! \fn template <class T> const T* QSharedDataPointer<T>::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 <class T> QSharedDataPointer<T>::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 <class T> QSharedDataPointer<T>::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 <class T> T* QSharedDataPointer<T>::data()
Returns a pointer to the shared data object.
This function calls detach().
\sa constData()
*/
-/*! \fn const T* QSharedDataPointer::data() const
+/*! \fn template <class T> const T* QSharedDataPointer<T>::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 <class T> const T* QSharedDataPointer<T>::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 <class T> void QSharedDataPointer<T>::swap(QSharedDataPointer &other)
Swap this instance's shared data pointer with the shared
data pointer in \a other.
*/
/*!
- \fn QSharedDataPointer<T> &QSharedDataPointer::operator=(QSharedDataPointer<T> &&other)
+ \fn template <class T> QSharedDataPointer<T> &QSharedDataPointer<T>::operator=(QSharedDataPointer<T> &&other)
Move-assigns \a other to this QSharedDataPointer instance.
\since 5.2
*/
-/*! \fn bool QSharedDataPointer::operator==(const QSharedDataPointer<T>& other) const
+/*! \fn template <class T> bool QSharedDataPointer<T>::operator==(const QSharedDataPointer<T>& 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<T>& other) const
+/*! \fn template <class T> bool QSharedDataPointer<T>::operator!=(const QSharedDataPointer<T>& 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 <class T> QSharedDataPointer<T>::QSharedDataPointer()
Constructs a QSharedDataPointer initialized with a null \e{d pointer}.
*/
/*!
- \fn QSharedDataPointer::QSharedDataPointer(QSharedDataPointer &&o)
+ \fn template <class T> QSharedDataPointer<T>::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 <class T> QSharedDataPointer<T>::~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 <class T> QSharedDataPointer<T>::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<T>& other)
+/*! \fn template <class T> QSharedDataPointer<T>::QSharedDataPointer(const QSharedDataPointer<T>& 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<T>& QSharedDataPointer::operator=(const QSharedDataPointer<T>& other)
+/*! \fn template <class T> QSharedDataPointer<T>& QSharedDataPointer<T>::operator=(const QSharedDataPointer<T>& 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 <class T> QSharedDataPointer& QSharedDataPointer<T>::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 <class T> bool QSharedDataPointer<T>::operator!() const
Returns \c true if the \e{d pointer} of \e this is null.
*/
-/*! \fn void QSharedDataPointer::detach()
+/*! \fn template <class T> void QSharedDataPointer<T>::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 <class T> T *QSharedDataPointer<T>::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 <class T> T& QExplicitlySharedDataPointer<T>::operator*() const
Provides access to the shared data object's members.
*/
-/*! \fn T* QExplicitlySharedDataPointer::operator->()
+/*! \fn template <class T> T* QExplicitlySharedDataPointer<T>::operator->()
Provides access to the shared data object's members.
*/
-/*! \fn const T* QExplicitlySharedDataPointer::operator->() const
+/*! \fn template <class T> const T* QExplicitlySharedDataPointer<T>::operator->() const
Provides const access to the shared data object's members.
*/
-/*! \fn T* QExplicitlySharedDataPointer::data() const
+/*! \fn template <class T> T* QExplicitlySharedDataPointer<T>::data() const
Returns a pointer to the shared data object.
*/
-/*! \fn const T* QExplicitlySharedDataPointer::constData() const
+/*! \fn template <class T> const T* QExplicitlySharedDataPointer<T>::constData() const
Returns a const pointer to the shared data object.
\sa data()
*/
-/*! \fn void QExplicitlySharedDataPointer::swap(QExplicitlySharedDataPointer &other)
+/*! \fn template <class T> void QExplicitlySharedDataPointer<T>::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<T>& other) const
+/*! \fn template <class T> bool QExplicitlySharedDataPointer<T>::operator==(const QExplicitlySharedDataPointer<T>& other) const
Returns \c true if \a other and \e this have the same \e{d pointer}.
*/
/*!
- \fn QExplicitlySharedDataPointer<T> &QExplicitlySharedDataPointer::operator=(QExplicitlySharedDataPointer<T> &&other)
+ \fn template <class T> QExplicitlySharedDataPointer<T> &QExplicitlySharedDataPointer<T>::operator=(QExplicitlySharedDataPointer<T> &&other)
Move-assigns \a other to this QExplicitlySharedDataPointer instance.
\since 5.2
*/
-/*! \fn bool QExplicitlySharedDataPointer::operator==(const T* ptr) const
+/*! \fn template <class T> bool QExplicitlySharedDataPointer<T>::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<T>& other) const
+/*! \fn template <class T> bool QExplicitlySharedDataPointer<T>::operator!=(const QExplicitlySharedDataPointer<T>& 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 <class T> bool QExplicitlySharedDataPointer<T>::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 <class T> QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer()
Constructs a QExplicitlySharedDataPointer initialized with a null
\e{d pointer}.
*/
-/*! \fn QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer()
+/*! \fn template <class T> QExplicitlySharedDataPointer<T>::~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 <class T> QExplicitlySharedDataPointer<T>::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 <class T> QExplicitlySharedDataPointer<T>::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<T>& other)
+/*! \fn template <class T> QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer<T>& 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<X>& other)
- This copy constructor is different in that it allows \a other to be
+/*! \fn template <class T> template <class X> QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer<X>& 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<T>& QExplicitlySharedDataPointer::operator=(const QExplicitlySharedDataPointer<T>& other)
+/*! \fn template <class T> QExplicitlySharedDataPointer<T>& QExplicitlySharedDataPointer<T>::operator=(const QExplicitlySharedDataPointer<T>& 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 <class T> QExplicitlySharedDataPointer& QExplicitlySharedDataPointer<T>::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 <class T> void QExplicitlySharedDataPointer<T>::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 <class T> QExplicitlySharedDataPointer<T>::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 <class T> bool QExplicitlySharedDataPointer<T>::operator!() const
Returns \c true if the \e{d pointer} of \e this is null.
*/
-/*! \fn void QExplicitlySharedDataPointer::detach()
+/*! \fn template <class T> void QExplicitlySharedDataPointer<T>::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 <class T> T *QExplicitlySharedDataPointer<T>::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<T>::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 <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.