diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 77409f5c710..a610fc46e53 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -477,6 +477,14 @@ you will get a compiler error. */ +/*! + \fn void QSharedPointer::swap(QSharedPointer &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 diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h index 7d1f00814d7..34b4bfbb126 100644 --- a/src/corelib/tools/qsharedpointer.h +++ b/src/corelib/tools/qsharedpointer.h @@ -79,6 +79,8 @@ public: QSharedPointer &operator=(const QSharedPointer &other); QSharedPointer &operator=(const QWeakPointer &other); + void swap(QSharedPointer &other); + QWeakPointer toWeakRef() const; void clear();