diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qsharedpointer.cpp | 8 | ||||
-rw-r--r-- | src/corelib/tools/qsharedpointer.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 77409f5c71..a610fc46e5 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -478,6 +478,14 @@ */ /*! + \fn void QSharedPointer::swap(QSharedPointer<T> &other); + \since 5.3 + + Swaps this shared pointer instance with \a other. This function is + very fast and never fails. +*/ + +/*! \fn T *QSharedPointer::data() const Returns the value of the pointer referenced by this object. diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h index 7d1f00814d..34b4bfbb12 100644 --- a/src/corelib/tools/qsharedpointer.h +++ b/src/corelib/tools/qsharedpointer.h @@ -79,6 +79,8 @@ public: QSharedPointer<T> &operator=(const QSharedPointer<T> &other); QSharedPointer<T> &operator=(const QWeakPointer<T> &other); + void swap(QSharedPointer<T> &other); + QWeakPointer<T> toWeakRef() const; void clear(); |