From b4a427bac6f16d4e81e6a9cdb7c78bc8ae7f42b4 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 28 Feb 2014 21:30:12 +0100 Subject: Doc: document QSharedPointer::swap() method The function is already present for quite some time, but was never documented, so declare it as \since 5.3. Add swap() function to qsharedpointer.h so it's visible to QDoc, too. Change-Id: I8eba420878a096392fd181a180d5751101d37a50 Reviewed-by: Thiago Macieira --- src/corelib/tools/qsharedpointer.cpp | 8 ++++++++ src/corelib/tools/qsharedpointer.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'src/corelib/tools') 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 @@ -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 7d1f00814d..34b4bfbb12 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(); -- cgit v1.2.3