diff options
Diffstat (limited to 'src/corelib/tools/qset.qdoc')
-rw-r--r-- | src/corelib/tools/qset.qdoc | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc index 47153e1349..4ef7a80a52 100644 --- a/src/corelib/tools/qset.qdoc +++ b/src/corelib/tools/qset.qdoc @@ -46,7 +46,7 @@ QSet is unordered, so an iterator's sequence cannot be assumed to be predictable. If ordering by key is required, use a QMap. - To navigate through a QSet, you can also use \l{foreach}: + To navigate through a QSet, you can also use range-based for: \snippet code/doc_src_qset.cpp 6 @@ -86,7 +86,7 @@ initializer list \a list. */ -/*! \fn template <class T> template<typename InputIterator> QSet<T>::QSet(InputIterator first, InputIterator last) +/*! \fn template <class T> template <typename InputIterator, QtPrivate::IfIsInputIterator<InputIterator> = true> QSet<T>::QSet(InputIterator first, InputIterator last) \since 5.14 Constructs a set with the contents in the iterator range [\a first, \a last). @@ -435,7 +435,7 @@ */ /*! - \fn template <class T> QSet<T>::insert(const T &value) + \fn template <class T> QSet<T>::iterator QSet<T>::insert(const T &value) Inserts item \a value into the set, if \a value isn't already in the set, and returns an iterator pointing at the inserted @@ -567,29 +567,30 @@ */ /*! - \fn template <class T> QSet<T> QSet<T>::operator|(const QSet<T> &other) const - \fn template <class T> QSet<T> QSet<T>::operator+(const QSet<T> &other) const + \fn template <class T> QSet<T> QSet<T>::operator|(const QSet &lhs, const QSet &rhs) + \fn template <class T> QSet<T> QSet<T>::operator|(QSet &&lhs, const QSet &rhs) + \fn template <class T> QSet<T> QSet<T>::operator+(const QSet &lhs, const QSet &rhs) + \fn template <class T> QSet<T> QSet<T>::operator+(QSet &&lhs, const QSet &rhs) - Returns a new QSet that is the union of this set and the - \a other set. + Returns a new QSet that is the union of sets \a lhs and \a rhs. \sa unite(), operator|=(), operator&(), operator-() */ /*! - \fn template <class T> QSet<T> QSet<T>::operator&(const QSet<T> &other) const + \fn template <class T> QSet<T> QSet<T>::operator&(const QSet &lhs, const QSet &rhs) + \fn template <class T> QSet<T> QSet<T>::operator&(QSet &&lhs, const QSet &rhs) - Returns a new QSet that is the intersection of this set and the - \a other set. + Returns a new QSet that is the intersection of sets \a lhs and \a rhs. \sa intersect(), operator&=(), operator|(), operator-() */ /*! - \fn template <class T> QSet<T> QSet<T>::operator-(const QSet<T> &other) const + \fn template <class T> QSet<T> QSet<T>::operator-(const QSet &lhs, const QSet &rhs) + \fn template <class T> QSet<T> QSet<T>::operator-(QSet &&lhs, const QSet &rhs) - Returns a new QSet that is the set difference of this set and - the \a other set, i.e., this set - \a other set. + Returns a new QSet that is the set difference of sets \a lhs and \a rhs. \sa subtract(), operator-=(), operator|(), operator&() */ @@ -886,3 +887,10 @@ from the set \a set. Returns the number of elements removed, if any. */ + +/*! \fn template <class T> template <class Pred> qsizetype QSet<T>::removeIf(Pred pred) + \since 6.1 + + Removes, from this set, all elements for which the predicate \a pred + returns \c true. Returns the number of elements removed, if any. +*/ |