diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-16 17:14:02 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-19 16:50:11 +0200 |
commit | 4ea7fbaf00bdfe804971dd05e56099ab915579f1 (patch) | |
tree | 50621f564fdc8ed65c87d413d6135656f5b1765b /src | |
parent | e4bc148ba2a3461c7f27b28570bdf73f617d907d (diff) |
QList docs: remove some QVector->QList leftovers
Change-Id: I2a7b5ef07ddb07a261110914088b9942801a3c25
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qlist.cpp | 17 | ||||
-rw-r--r-- | src/corelib/tools/qlist.qdoc | 46 |
2 files changed, 5 insertions, 58 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qlist.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qlist.cpp index e959915c5e..f8ad19e2ae 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qlist.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qlist.cpp @@ -191,20 +191,3 @@ list.lastIndexOf("B", 3); // returns 3 list.lastIndexOf("B", 2); // returns 1 list.lastIndexOf("X"); // returns -1 //! [13] - -//! [16] -std::vector<double> stdvector; -stdvector.push_back(1.2); -stdvector.push_back(0.5); -stdvector.push_back(3.14); - -QList<double> list = QList<double>::fromStdVector(stdvector); -//! [16] - - -//! [17] -QList<double> list; -list << 1.2 << 0.5 << 3.14; - -std::vector<double> stdvector = list.toStdVector(); -//! [17] diff --git a/src/corelib/tools/qlist.qdoc b/src/corelib/tools/qlist.qdoc index c25a7fe4cb..916715ddb8 100644 --- a/src/corelib/tools/qlist.qdoc +++ b/src/corelib/tools/qlist.qdoc @@ -833,7 +833,7 @@ \include qlist.qdoc iterator-invalidation-erase - \sa remove(), QList::removeAt() + \sa remove() */ /*! \fn template <typename T> qsizetype QList<T>::removeAll(const T &t) @@ -842,9 +842,7 @@ Removes all elements that compare equal to \a t from the list. Returns the number of elements removed, if any. - Provided for compatibility with QList. - - \sa removeOne(), QList::removeAll() + \sa removeOne() */ /*! \fn template <typename T> bool QList<T>::removeOne(const T &t) @@ -853,9 +851,7 @@ Removes the first element that compares equal to \a t from the list. Returns whether an element was, in fact, removed. - Provided for compatibility with QList. - - \sa removeAll(), QList::removeOne() + \sa removeAll() */ /*! \fn template <typename T> qsizetype QList<T>::length() const @@ -863,9 +859,7 @@ Same as size() and count(). - Provided for compatibility with QList. - - \sa size(), count(), QList::length() + \sa size(), count() */ /*! \fn template <typename T> T QList<T>::takeAt(qsizetype i) @@ -880,9 +874,7 @@ return t; \endcode - Provided for compatibility with QList. - - \sa takeFirst(), takeLast(), QList::takeAt() + \sa takeFirst(), takeLast() */ /*! \fn template <typename T> void QList<T>::move(qsizetype from, qsizetype to) @@ -890,8 +882,6 @@ Moves the item at index position \a from to index position \a to. - Provided for compatibility with QList. - \sa QList::move() */ @@ -1524,32 +1514,6 @@ Returns this list. */ -/*! \fn template <typename T> QList<T> QList<T>::fromStdVector(const std::vector<T> &vector) - - Returns a QList object with the data contained in \a vector. The - order of the elements in the QList is the same as in \a vector. - - Example: - - \snippet code/src_corelib_tools_qlist.cpp 16 - - \include containers-range-constructor.qdocinc - - \sa toStdVector(), QList::fromStdList() -*/ - -/*! \fn template <typename T> std::vector<T> QList<T>::toStdVector() const - - Returns a std::vector object with the data contained in this QList. - Example: - - \snippet code/src_corelib_tools_qlist.cpp 17 - - \include containers-range-constructor.qdocinc - - \sa fromStdVector(), QList::toStdList() -*/ - /*! \fn template <typename T> QDataStream &operator<<(QDataStream &out, const QList<T> &list) \relates QList |