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 <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2014-02-28 21:30:12 +01:00 committed by The Qt Project
parent 9b58f95c63
commit b4a427bac6
2 changed files with 10 additions and 0 deletions

View File

@ -477,6 +477,14 @@
you will get a compiler error.
*/
/*!
\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

View File

@ -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();