diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-03-06 08:37:33 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-16 19:27:59 +0100 |
commit | 0ebca8f46fdfb8c99926cf28717b62c8cd741858 (patch) | |
tree | 5d94df9183a062c28f85fb422834b58003c86396 /src/corelib/tools/qsharedpointer.cpp | |
parent | 0731c90eec594224954ea1c6677e6bf2cff50e51 (diff) |
QSharedPointer: add reset() member functions
These have been added for std::shared_ptr compatibility,
but in particular to allow tst_qnetworkreply && friends
to drop the implicit conversions added to QSP by
inheritance, so QSP can become final.
Change-Id: I0f0401b02125d65622e52393b40a3b10bd9a850c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qsharedpointer.cpp')
-rw-r--r-- | src/corelib/tools/qsharedpointer.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 58c62f0a3e..50e555d968 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -698,6 +698,35 @@ */ /*! + \fn void QSharedPointer::reset() + \since 5.0 + + Same as clear(). For std::shared_ptr compatibility. +*/ + +/*! + \fn void QSharedPointer::reset(T *t) + \since 5.0 + + Resets this QSharedPointer object to point to \a t + instead. Equivalent to: + \code + QSharedPointer<T> other(t); this->swap(other); + \endcode +*/ + +/*! + \fn 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: + \code + QSharedPointer<T> other(t, deleter); this->swap(other); + \endcode +*/ + +/*! \fn QWeakPointer::QWeakPointer() Creates a QWeakPointer that points to nothing. |