summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qset.qdoc
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-05-16 18:16:04 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-05-16 18:16:04 +0300
commit231d3670981a33ec42b91ad1cb33c1fc50551066 (patch)
treeb1ef1096f4e279baaa2ea0d2daf14b5c4185a82f /src/corelib/tools/qset.qdoc
parentffdd372c7bbda62e9d937f406319f38e3e982774 (diff)
parent8fc1a885d19a2dfb1a3a684aea1cfa41967e041f (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.5' into tqtc/lts-5.15-opensourcev5.15.5-lts-lgpl
Diffstat (limited to 'src/corelib/tools/qset.qdoc')
-rw-r--r--src/corelib/tools/qset.qdoc55
1 files changed, 43 insertions, 12 deletions
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index 42dd1288ac..dcd6de3d5c 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -1071,17 +1071,32 @@
*/
/*! \fn template <class T> QList<T> QSet<T>::toList() const
+ \obsolete
Returns a new QList containing the elements in the set. The
order of the elements in the QList is undefined.
- Example:
+ \include containers-range-constructor.qdocinc
- \snippet code/doc_src_qset.cpp 13
+ \oldcode
+ QSet<QString> set;
+ // ...
+ QList<QString> list = set.toList();
+ \newcode
+ QSet<QString> set;
+ // ...
+ QList<QString> list(set.begin(), set.end());
+ \endcode
- \include containers-range-constructor.qdocinc
+ or
- \sa fromList(), QList::fromSet()
+ \code
+ QSet<QString> set;
+ // ...
+ QList<QString> list = set.values();
+ \endcode
+
+ \sa QList::QList(InputIterator, InputIterator), values(), fromList(), QList::fromSet()
*/
/*! \fn template <class T> QList<T> QSet<T>::values() const
@@ -1089,28 +1104,44 @@
Returns a new QList containing the elements in the set. The
order of the elements in the QList is undefined.
- This is the same as toList().
-
\include containers-range-constructor.qdocinc
- \sa fromList(), QList::fromSet()
+ \oldcode
+ QSet<QString> set;
+ // ...
+ QList<QString> list = set.values();
+ \newcode
+ QSet<QString> set;
+ // ...
+ QList<QString> list(set.begin(), set.end());
+ \endcode
+
+
+ \sa QList::QList(InputIterator, InputIterator)
*/
/*! \fn template <class T> QSet<T> QSet<T>::fromList(const QList<T> &list)
+ \obsolete
Returns a new QSet object containing the data contained in \a
list. Since QSet doesn't allow duplicates, the resulting QSet
might be smaller than the \a list, because QList can contain
duplicates.
- Example:
-
- \snippet code/doc_src_qset.cpp 14
-
\include containers-range-constructor.qdocinc
- \sa toList(), QList::toSet()
+ \oldcode
+ QStringList list;
+ // ...
+ QSet<QString> set = QSet<QString>::fromList(list);
+ \newcode
+ QStringList list;
+ // ...
+ QSet<QString> set(list.begin(), list.end());
+ \endcode
+
+ \sa QSet(InputIterator, InputIterator), values(), QList::toSet()
*/
/*!