diff options
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qvarlengtharray.qdoc | 30 | ||||
-rw-r--r-- | src/corelib/tools/qvector.h | 8 | ||||
-rw-r--r-- | src/corelib/tools/qvector.qdoc | 36 |
3 files changed, 21 insertions, 53 deletions
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc index dd86a80e9d..336f2afaca 100644 --- a/src/corelib/tools/qvarlengtharray.qdoc +++ b/src/corelib/tools/qvarlengtharray.qdoc @@ -516,7 +516,9 @@ Typedef for \c{std::reverse_iterator<T*>}. Provided for STL compatibility. */ -/*! \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::prepend(const T &value) +/*! + \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::prepend(const T &value) + \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::prepend(T &&value) \since 4.8 Inserts \a value at the beginning of the array. @@ -533,13 +535,6 @@ \sa append(), insert() */ -/*! - \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::prepend(T &&value) - \since 5.11 - - \overload -*/ - /*! \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::replace(int i, const T &value) \since 4.8 @@ -703,7 +698,9 @@ before the call. */ -/*! \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::insert(int i, const T &value) +/*! + \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::insert(int i, const T &value) + \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::insert(int i, T &&value) \since 4.8 Inserts \a value at index position \a i in the array. If \a i is @@ -728,15 +725,8 @@ vector. */ - -/*! \fn template<class T, int Prealloc> void QVarLengthArray<T, Prealloc>::insert(int i, T &&value) - - \overload - \since 5.11 - -*/ - /*! \fn template<class T, int Prealloc> QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(const_iterator before, const T &value) + \fn template<class T, int Prealloc> QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(const_iterator before, T &&value) \overload \since 4.8 @@ -745,12 +735,6 @@ \a before. Returns an iterator pointing at the inserted item. */ -/*! \fn template<class T, int Prealloc> QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(const_iterator before, T &&value) - - \overload - \since 5.11 -*/ - /*! \fn template<class T, int Prealloc> QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(const_iterator before, int count, const T &value) \since 4.8 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 diff --git a/src/corelib/tools/qvector.qdoc b/src/corelib/tools/qvector.qdoc index e344a9023d..cc250b72a5 100644 --- a/src/corelib/tools/qvector.qdoc +++ b/src/corelib/tools/qvector.qdoc @@ -587,7 +587,9 @@ */ -/*! \fn template <typename T> void QVector<T>::prepend(const T &value) +/*! + \fn template <typename T> void QVector<T>::prepend(const T &value) + \fn template <typename T> void QVector<T>::prepend(T &&value) Inserts \a value at the beginning of the vector. @@ -605,17 +607,8 @@ \sa append(), insert() */ -/*! - \fn template <typename T> void QVector<T>::prepend(T &&value) - \since 5.11 - - \overload - - Inserts \a value at the beginning of the vector using move semantics. -*/ - - /*! \fn template <typename T> void QVector<T>::insert(int i, const T &value) + \fn template <typename T> void QVector<T>::insert(int i, T &&value) Inserts \a value at index position \a i in the vector. If \a i is 0, the value is prepended to the vector. If \a i is size(), the @@ -633,14 +626,6 @@ \sa append(), prepend(), remove() */ -/*! \fn template <typename T> void QVector<T>::insert(int i, T &&value) - \since 5.11 - - \overload - - Inserts \a value at index position \a i in the vector using move semantics. -*/ - /*! \fn template <typename T> void QVector<T>::insert(int i, int count, const T &value) \overload @@ -652,7 +637,9 @@ \snippet code/src_corelib_tools_qvector.cpp 10 */ -/*! \fn template <typename T> QVector<T>::iterator QVector<T>::insert(iterator before, const T &value) +/*! + \fn template <typename T> QVector<T>::iterator QVector<T>::insert(iterator before, const T &value) + \fn template <typename T> QVector<T>::iterator QVector<T>::insert(iterator before, T &&value) \overload @@ -1102,17 +1089,14 @@ \overload */ -/*! \fn template <typename T> void QVector<T>::push_front(const T &value) +/*! + \fn template <typename T> void QVector<T>::push_front(const T &value) + \fn template <typename T> void QVector<T>::push_front(T &&value) This function is provided for STL compatibility. It is equivalent to prepend(\a value). */ -/*! \fn template <typename T> void QVector<T>::push_front(T &&value) - \since 5.11 - \overload -*/ - /*! \fn template <typename T> void QVector<T>::pop_front() This function is provided for STL compatibility. It is equivalent |