From 4ea7fbaf00bdfe804971dd05e56099ab915579f1 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 16 Oct 2020 17:14:02 +0200 Subject: [PATCH] QList docs: remove some QVector->QList leftovers Change-Id: I2a7b5ef07ddb07a261110914088b9942801a3c25 Reviewed-by: Paul Wicking --- .../snippets/code/src_corelib_tools_qlist.cpp | 17 ------- 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 stdvector; -stdvector.push_back(1.2); -stdvector.push_back(0.5); -stdvector.push_back(3.14); - -QList list = QList::fromStdVector(stdvector); -//! [16] - - -//! [17] -QList list; -list << 1.2 << 0.5 << 3.14; - -std::vector 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 qsizetype QList::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 bool QList::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 qsizetype QList::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 T QList::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 void QList::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 QList QList::fromStdVector(const std::vector &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 std::vector QList::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 QDataStream &operator<<(QDataStream &out, const QList &list) \relates QList