diff options
-rw-r--r-- | src/corelib/tools/qvarlengtharray.h | 12 | ||||
-rw-r--r-- | src/corelib/tools/qvarlengtharray.qdoc | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index 58b26be4a9..ba24541d2d 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -167,10 +167,10 @@ public: inline const_iterator end() const { return ptr + s; } inline const_iterator cend() const { return ptr + s; } inline const_iterator constEnd() const { return ptr + s; } - iterator insert(iterator before, int n, const T &x); - inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); } - iterator erase(iterator begin, iterator end); - inline iterator erase(iterator pos) { return erase(pos, pos+1); } + iterator insert(const_iterator before, int n, const T &x); + inline iterator insert(const_iterator before, const T &x) { return insert(before, 1, x); } + iterator erase(const_iterator begin, const_iterator end); + inline iterator erase(const_iterator pos) { return erase(pos, pos+1); } private: friend class QPodList<T, Prealloc>; @@ -338,7 +338,7 @@ inline void QVarLengthArray<T, Prealloc>::replace(int i, const T &t) template <class T, int Prealloc> -Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(iterator before, size_type n, const T &t) +Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(const_iterator before, size_type n, const T &t) { int offset = int(before - ptr); if (n != 0) { @@ -365,7 +365,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthA } template <class T, int Prealloc> -Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::erase(iterator abegin, iterator aend) +Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::erase(const_iterator abegin, const_iterator aend) { int f = int(abegin - ptr); int l = int(aend - ptr); diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc index fbd984e62b..45eab98731 100644 --- a/src/corelib/tools/qvarlengtharray.qdoc +++ b/src/corelib/tools/qvarlengtharray.qdoc @@ -504,7 +504,7 @@ \sa constBegin(), end() */ -/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(iterator pos) +/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(const_iterator pos) \since 4.8 Removes the item pointed to by the iterator \a pos from the @@ -514,7 +514,7 @@ \sa insert(), remove() */ -/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(iterator begin, iterator end) +/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(const_iterator begin, const_iterator end) \overload \since 4.8 @@ -549,7 +549,7 @@ vector. */ -/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(iterator before, const T &value) +/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(const_iterator before, const T &value) \overload \since 4.8 @@ -558,7 +558,7 @@ \a before. Returns an iterator pointing at the inserted item. */ -/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(iterator before, int count, const T &value) +/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(const_iterator before, int count, const T &value) \since 4.8 Inserts \a count copies of \a value in front of the item pointed to |