diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-08-22 18:05:45 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-07-27 21:54:47 +0000 |
commit | 62b4c9169c23f510747a384fe3f1ed78bee4b435 (patch) | |
tree | da2d833da0056f95e71643f6b5eaa7e6f06ab06b /src/corelib/tools/qmultimap.qdoc | |
parent | b17d6b270178523cd1071cc2472c9d4b9789a567 (diff) |
QMap: add operator+ and - for iterators
We missed the chance of deprecating them in 5.15, so
they'll just add to the pain of porting to 6.0. We
should not keep them around forever, though; QMap isn't
random access and so its iterators should only have
bidirectional APIs.
Fixes: QTBUG-95334
Change-Id: I3577f7d25e8ab793722d2f220fd27bc85c622b0d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit cc584c59de644195ae0c4f7f99ad428e189df07d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/tools/qmultimap.qdoc')
-rw-r--r-- | src/corelib/tools/qmultimap.qdoc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/corelib/tools/qmultimap.qdoc b/src/corelib/tools/qmultimap.qdoc index 913d4155d7..bd17a03ba2 100644 --- a/src/corelib/tools/qmultimap.qdoc +++ b/src/corelib/tools/qmultimap.qdoc @@ -1197,6 +1197,22 @@ current item. */ +/*! \fn template <class Key, class T> QMultiMap<Key, T>::iterator operator+(QMultiMap<Key, T>::iterator, difference_type n) + \fn template <class Key, class T> QMultiMap<Key, T>::iterator operator+(difference_type n, QMultiMap<Key, T>::iterator) + \fn template <class Key, class T> QMultiMap<Key, T>::iterator operator-(QMultiMap<Key, T>::iterator, difference_type n) + \fn template <class Key, class T> QMultiMap<Key, T>::iterator operator-(difference_type n, QMultiMap<Key, T>::iterator) + \fn template <class Key, class T> QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator+=(difference_type n) + \fn template <class Key, class T> QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator-=(difference_type n) + + \obsolete + + Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. + + Move an iterator by \e{n} positions. These operations can be + expensive for large values of \e{n}; QMultiMap iterators are not + random access. +*/ + /*! \class QMultiMap::const_iterator \inmodule QtCore \brief The QMultiMap::const_iterator class provides an STL-style const iterator for QMultiMap. @@ -1353,6 +1369,22 @@ current item. */ +/*! \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator operator+(QMultiMap<Key, T>::const_iterator, difference_type n) + \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator operator+(difference_type n, QMultiMap<Key, T>::const_iterator) + \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator operator-(QMultiMap<Key, T>::const_iterator, difference_type n) + \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator operator-(difference_type n, QMultiMap<Key, T>::const_iterator) + \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator+=(difference_type n) + \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator-=(difference_type n) + + \obsolete + + Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. + + Move an iterator by \e{n} positions. These operations can be + expensive for large values of \e{n}. QMultiMap iterators are not + random access. +*/ + /*! \class QMultiMap::key_iterator \inmodule QtCore \since 5.6 |