diff options
author | Martin Smith <martin.smith@qt.io> | 2018-01-25 09:43:39 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-02-03 17:26:07 +0000 |
commit | 017569f702b6dd0bc3aa077d85e4a7fc27562133 (patch) | |
tree | 17677315b3d9494d1d9dce16a8e9c278e6c4e1e4 /src/corelib/tools/qvector.h | |
parent | f1eb4c4463d4e71ccb944711a2e9fa122b802abb (diff) |
doc: Add missing \fn commands for new members
New members were added to QVarLengthArray and QVector,
but the engineer didn't document them. Since they are
only slightly different versions of existing functions,
their \fn commands were added to the eisting qdoc comments.
Some defined(Q_CLANG_QDOC) uses were also added.
Change-Id: I8a5505ca27efc9205b1387ed0be310e4b74ec490
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r-- | src/corelib/tools/qvector.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 5ebf7f7435..24a19e68d4 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -72,7 +72,7 @@ public: inline QVector(const QVector<T> &v); inline ~QVector() { if (!d->ref.deref()) freeData(d); } QVector<T> &operator=(const QVector<T> &v); -#ifdef Q_COMPILER_RVALUE_REFS +#if defined(Q_COMPILER_RVALUE_REFS) || defined(Q_CLANG_QDOC) QVector(QVector<T> &&other) Q_DECL_NOTHROW : d(other.d) { other.d = Data::sharedNull(); } QVector<T> &operator=(QVector<T> &&other) Q_DECL_NOTHROW { QVector moved(std::move(other)); swap(moved); return *this; } @@ -133,7 +133,7 @@ public: T &operator[](int i); const T &operator[](int i) const; void append(const T &t); -#ifdef Q_COMPILER_RVALUE_REFS +#if defined(Q_COMPILER_RVALUE_REFS) || defined(Q_CLANG_QDOC) void append(T &&t); #endif inline void append(const QVector<T> &l) { *this += l; } @@ -201,7 +201,7 @@ public: typedef typename Data::const_iterator const_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; -#if !defined(QT_STRICT_ITERATORS) || defined(Q_QDOC) +#if !defined(QT_STRICT_ITERATORS) || defined(Q_CLANG_QDOC) inline iterator begin() { detach(); return d->begin(); } inline const_iterator begin() const Q_DECL_NOTHROW { return d->constBegin(); } inline const_iterator cbegin() const Q_DECL_NOTHROW { return d->constBegin(); } @@ -258,7 +258,7 @@ public: typedef const_iterator ConstIterator; typedef int size_type; inline void push_back(const T &t) { append(t); } -#ifdef Q_COMPILER_RVALUE_REFS +#if defined(Q_COMPILER_RVALUE_REFS) || defined(Q_CLANG_QDOC) void push_back(T &&t) { append(std::move(t)); } void push_front(T &&t) { prepend(std::move(t)); } #endif |