From 63a559845ce33b054d3f6d8b3c2b80f05eeffb16 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 29 Jan 2020 11:13:31 +0100 Subject: Remove QLinkedList QLinkedList has been moved to Qt5Compat. Remove and stop mentioning it in docs, examples (the docs & examples for QLinkedList itself will be moved to Qt5Compat) and remove the corresponding tests. Also remove QT_NO_LINKED_LIST, since it's not needed anymore. Task-number: QTBUG-81630 Task-number: QTBUG-80312 Change-Id: I4a8f1105cb60aa87e7fd67e901ec1a27c489aa31 Reviewed-by: Lars Knoll --- src/corelib/doc/src/containers.qdoc | 37 ++++++++++--------------------- src/corelib/doc/src/datastreamformat.qdoc | 1 - src/corelib/doc/src/dontdocument.qdoc | 2 +- 3 files changed, 13 insertions(+), 27 deletions(-) (limited to 'src/corelib/doc/src') diff --git a/src/corelib/doc/src/containers.qdoc b/src/corelib/doc/src/containers.qdoc index 8373ad4b4e..61bce214be 100644 --- a/src/corelib/doc/src/containers.qdoc +++ b/src/corelib/doc/src/containers.qdoc @@ -75,9 +75,9 @@ \section1 The Container Classes Qt provides the following sequential containers: QVector, - QLinkedList, QStack, and QQueue. For most + QStack, and QQueue. For most applications, QVector is the best type to use. It provides very fast - appends. If you really need a linked-list, use QLinkedList. + appends. If you really need a linked-list, use std::list. QStack and QQueue are convenience classes that provide LIFO and FIFO semantics. @@ -93,14 +93,6 @@ \table \header \li Class \li Summary - \row \li \l{QLinkedList} - \li This class implements a doubly linked list. It - provides better performance than QVector when inserting in the - middle of a huge list, and it has nicer iterator semantics. - (Iterators pointing to an item in a QLinkedList remain valid as - long as the item exists, whereas iterators to a QVector can become - invalid after any insertion or removal.) - \row \li \l{QVector} \li This is by far the most commonly used container class. It stores a list of values of a given type (T) that can be accessed @@ -155,7 +147,7 @@ QString and the value type QVector. The containers are defined in individual header files with the - same name as the container (e.g., \c ). For + same name as the container (e.g., \c ). For convenience, the containers are forward declared in \c . @@ -248,8 +240,6 @@ \header \li Containers \li Read-only iterator \li Read-write iterator \li QMutableListIterator - \row \li QLinkedList \li QLinkedListIterator - \li QMutableLinkedListIterator \row \li QVector, QStack, QQueue \li QVectorIterator \li QMutableVectorIterator \row \li QSet \li QSetIterator @@ -261,7 +251,7 @@ \endtable In this discussion, we will concentrate on QVector and QMap. The - iterator types for QLinkedList, QVector, and QSet have exactly + iterator types for QSet have exactly the same interface as QVector's iterators; similarly, the iterator types for QHash have the same interface as QMap's iterators. @@ -362,7 +352,7 @@ \snippet code/doc_src_containers.cpp 6 - As mentioned above, QLinkedList's, QVector's, and QSet's iterator + As mentioned above QSet's iterator classes have exactly the same API as QVector's. We will now turn to QMapIterator, which is somewhat different because it iterates on (key, value) pairs. @@ -415,8 +405,6 @@ \table \header \li Containers \li Read-only iterator \li Read-write iterator - \row \li QLinkedList \li QLinkedList::const_iterator - \li QLinkedList::iterator \row \li QVector, QStack, QQueue \li QVector::const_iterator \li QVector::iterator \row \li QSet \li QSet::const_iterator @@ -437,7 +425,7 @@ just a typedef for \c{const T *}. In this discussion, we will concentrate on QVector and QMap. The - iterator types for QLinkedList, QVector, and QSet have exactly + iterator types for QSet have exactly the same interface as QVector's iterators; similarly, the iterator types for QHash have the same interface as QMap's iterators. @@ -542,7 +530,7 @@ Its syntax is: \c foreach (\e variable, \e container) \e statement. For example, here's how to use \c foreach to iterate - over a QLinkedList: + over a QVector: \snippet code/doc_src_containers.cpp 15 @@ -631,9 +619,9 @@ Algorithmic complexity is concerned about how fast (or slow) each function is as the number of items in the container grow. For - example, inserting an item in the middle of a QLinkedList is an + example, inserting an item in the middle of a std::list is an extremely fast operation, irrespective of the number of items - stored in the QLinkedList. On the other hand, inserting an item + stored in the list. On the other hand, inserting an item in the middle of a QVector is potentially very expensive if the QVector contains many items, since half of the items must be moved one position in memory. @@ -651,7 +639,7 @@ \li \b{Constant time:} O(1). A function is said to run in constant time if it requires the same amount of time no matter how many items are present in the container. One example is - QLinkedList::insert(). + QVector::push_back(). \li \b{Logarithmic time:} O(log \e n). A function that runs in logarithmic time is a function whose running time is @@ -673,12 +661,11 @@ number of items stored in the container. \endlist - The following table summarizes the algorithmic complexity of Qt's - sequential container classes: + The following table summarizes the algorithmic complexity of the sequential + container QVector: \table \header \li \li Index lookup \li Insertion \li Prepending \li Appending - \row \li QLinkedList \li O(\e n) \li O(1) \li O(1) \li O(1) \row \li QVector \li O(1) \li O(n) \li O(n) \li Amort. O(1) \endtable diff --git a/src/corelib/doc/src/datastreamformat.qdoc b/src/corelib/doc/src/datastreamformat.qdoc index def9021350..b813612eec 100644 --- a/src/corelib/doc/src/datastreamformat.qdoc +++ b/src/corelib/doc/src/datastreamformat.qdoc @@ -66,7 +66,6 @@ \li QIcon \li QImage \li QKeySequence - \li QLinkedList \li QMap \li QMargins \li QMatrix4x4 diff --git a/src/corelib/doc/src/dontdocument.qdoc b/src/corelib/doc/src/dontdocument.qdoc index 5fe05997cc..b1af82fbe2 100644 --- a/src/corelib/doc/src/dontdocument.qdoc +++ b/src/corelib/doc/src/dontdocument.qdoc @@ -36,6 +36,6 @@ QContiguousCacheData QContiguousCacheTypedData QNoDebug QUrlTwoFlags QCborValueRef qfloat16 QDeferredDeleteEvent QSpecialInteger QLittleEndianStorageType QBigEndianStorageType QFactoryInterface QFutureWatcherBase QJsonValuePtr - QJsonValueRefPtr QLinkedListNode QAbstractConcatenable QStringBuilderCommon + QJsonValueRefPtr QAbstractConcatenable QStringBuilderCommon QTextCodec::ConverterState QThreadStorageData QTextStreamManipulator) */ -- cgit v1.2.3