diff options
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qalgorithms.qdoc | 2 | ||||
-rw-r--r-- | src/corelib/tools/qcontainerfwd.h | 3 | ||||
-rw-r--r-- | src/corelib/tools/qiterator.qdoc | 163 | ||||
-rw-r--r-- | src/corelib/tools/qlinkedlist.cpp | 1238 | ||||
-rw-r--r-- | src/corelib/tools/qlinkedlist.h | 612 | ||||
-rw-r--r-- | src/corelib/tools/qvarlengtharray.qdoc | 7 | ||||
-rw-r--r-- | src/corelib/tools/qvector.qdoc | 17 | ||||
-rw-r--r-- | src/corelib/tools/tools.pri | 2 |
8 files changed, 9 insertions, 2035 deletions
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index c86e69f9c3..a4a30cc798 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -39,7 +39,7 @@ on all items in a given container or in a given range. You can use these algorithms with any \l {container class} that provides STL-style iterators, including Qt's QList, - QLinkedList, QVector, QMap, and QHash classes. + QVector, QMap, and QHash classes. Most algorithms take \l {STL-style iterators} as parameters. The algorithms are generic in the sense that they aren't bound to a diff --git a/src/corelib/tools/qcontainerfwd.h b/src/corelib/tools/qcontainerfwd.h index d6e30d77e3..0ace4473ec 100644 --- a/src/corelib/tools/qcontainerfwd.h +++ b/src/corelib/tools/qcontainerfwd.h @@ -47,9 +47,6 @@ QT_BEGIN_NAMESPACE template <class Key, class T> class QCache; template <class Key, class T> class QHash; -#if !defined(QT_NO_LINKED_LIST) && QT_DEPRECATED_SINCE(5, 15) -template <class T> class QLinkedList; -#endif template <class Key, class T> class QMap; template <class Key, class T> class QMultiHash; template <class Key, class T> class QMultiMap; diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc index 3531fb202c..69f9d52ce5 100644 --- a/src/corelib/tools/qiterator.qdoc +++ b/src/corelib/tools/qiterator.qdoc @@ -201,55 +201,6 @@ */ /*! - \class QLinkedListIterator - \inmodule QtCore - \obsolete - - \brief The QLinkedListIterator class provides a Java-style const iterator for QLinkedList. - - QLinkedList has both \l{Java-style iterators} and - \l{STL-style iterators}. The Java-style iterators are more - high-level and easier to use than the STL-style iterators; on the - other hand, they are slightly less efficient. - - QLinkedListIterator\<T\> allows you to iterate over a - QLinkedList\<T\>. If you want to modify the list as you iterate - over it, use QMutableLinkedListIterator\<T\> instead. - - The QLinkedListIterator constructor takes a QLinkedList as - argument. After construction, the iterator is located at the very - beginning of the list (before the first item). Here's how to - iterate over all the elements sequentially: - - \snippet code/doc_src_qiterator.cpp 2 - - The next() function returns the next item in the list and - advances the iterator. Unlike STL-style iterators, Java-style - iterators point \e between items rather than directly \e at - items. The first call to next() advances the iterator to the - position between the first and second item, and returns the first - item; the second call to next() advances the iterator to the - position between the second and third item, and returns the second - item; and so on. - - \image javaiterators1.png - - Here's how to iterate over the elements in reverse order: - - \snippet code/doc_src_qiterator.cpp 3 - - If you want to find all occurrences of a particular value, use - findNext() or findPrevious() in a loop. - - Multiple iterators can be used on the same list. If the list is - modified while a QLinkedListIterator is active, the - QLinkedListIterator will continue iterating over the original - list, ignoring the modified copy. - - \sa QMutableLinkedListIterator, QLinkedList::const_iterator -*/ - -/*! \class QVectorIterator \inmodule QtCore \brief The QVectorIterator class provides a Java-style const iterator for QVector and QStack. @@ -415,68 +366,6 @@ */ /*! - \class QMutableLinkedListIterator - \inmodule QtCore - \obsolete - - \brief The QMutableLinkedListIterator class provides a Java-style non-const iterator for QLinkedList. - - QLinkedList has both \l{Java-style iterators} and - \l{STL-style iterators}. The Java-style iterators are more - high-level and easier to use than the STL-style iterators; on the - other hand, they are slightly less efficient. - - QMutableLinkedListIterator\<T\> allows you to iterate over a - QLinkedList\<T\> and modify the list. If you don't want to modify - the list (or have a const QLinkedList), use the slightly faster - QLinkedListIterator\<T\> instead. - - The QMutableLinkedListIterator constructor takes a QLinkedList as - argument. After construction, the iterator is located at the very - beginning of the list (before the first item). Here's how to - iterate over all the elements sequentially: - - \snippet code/doc_src_qiterator.cpp 11 - - The next() function returns the next item in the list and - advances the iterator. Unlike STL-style iterators, Java-style - iterators point \e between items rather than directly \e at - items. The first call to next() advances the iterator to the - position between the first and second item, and returns the first - item; the second call to next() advances the iterator to the - position between the second and third item, returning the second - item; and so on. - - \image javaiterators1.png - - Here's how to iterate over the elements in reverse order: - - \snippet code/doc_src_qiterator.cpp 12 - - If you want to find all occurrences of a particular value, use - findNext() or findPrevious() in a loop. - - If you want to remove items as you iterate over the list, use - remove(). If you want to modify the value of an item, use - setValue(). If you want to insert a new item in the list, use - insert(). - - Example: - \snippet code/doc_src_qiterator.cpp 13 - - The example traverses a list, replacing negative numbers with - their absolute values, and eliminating zeroes. - - Only one mutable iterator can be active on a given list at any - time. Furthermore, no changes should be done directly to the list - while the iterator is active (as opposed to through the - iterator), since this could invalidate the iterator and lead to - undefined behavior. - - \sa QLinkedListIterator, QLinkedList::iterator -*/ - -/*! \class QMutableVectorIterator \inmodule QtCore @@ -595,9 +484,7 @@ /*! \fn template <class T> QListIterator<T>::QListIterator(const QList<T> &list) - \fn template <class T> QLinkedListIterator<T>::QLinkedListIterator(const QLinkedList<T> &list) \fn template <class T> QMutableListIterator<T>::QMutableListIterator(QList<T> &list) - \fn template <class T> QMutableLinkedListIterator<T>::QMutableLinkedListIterator(QLinkedList<T> &list) Constructs an iterator for traversing \a list. The iterator is set to be at the front of the list (before the first item). @@ -626,9 +513,7 @@ */ /*! \fn template <class T> QMutableListIterator &QMutableListIterator<T>::operator=(QList<T> &list) - \fn template <class T> QMutableLinkedListIterator &QMutableLinkedListIterator<T>::operator=(QLinkedList<T> &list) \fn template <class T> QListIterator &QListIterator<T>::operator=(const QList<T> &list) - \fn template <class T> QLinkedListIterator &QLinkedListIterator<T>::operator=(const QLinkedList<T> &list) Makes the iterator operate on \a list. The iterator is set to be at the front of the list (before the first item). @@ -655,11 +540,9 @@ */ /*! \fn template <class T> void QListIterator<T>::toFront() - \fn template <class T> void QLinkedListIterator<T>::toFront() \fn template <class T> void QVectorIterator<T>::toFront() \fn template <class T> void QSetIterator<T>::toFront() \fn template <class T> void QMutableListIterator<T>::toFront() - \fn template <class T> void QMutableLinkedListIterator<T>::toFront() \fn template <class T> void QMutableVectorIterator<T>::toFront() \fn template <class T> void QMutableSetIterator<T>::toFront() @@ -670,11 +553,9 @@ */ /*! \fn template <class T> void QListIterator<T>::toBack() - \fn template <class T> void QLinkedListIterator<T>::toBack() \fn template <class T> void QVectorIterator<T>::toBack() \fn template <class T> void QSetIterator<T>::toBack() \fn template <class T> void QMutableListIterator<T>::toBack() - \fn template <class T> void QMutableLinkedListIterator<T>::toBack() \fn template <class T> void QMutableVectorIterator<T>::toBack() \fn template <class T> void QMutableSetIterator<T>::toBack() @@ -685,11 +566,9 @@ */ /*! \fn template <class T> bool QListIterator<T>::hasNext() const - \fn template <class T> bool QLinkedListIterator<T>::hasNext() const \fn template <class T> bool QVectorIterator<T>::hasNext() const \fn template <class T> bool QSetIterator<T>::hasNext() const \fn template <class T> bool QMutableListIterator<T>::hasNext() const - \fn template <class T> bool QMutableLinkedListIterator<T>::hasNext() const \fn template <class T> bool QMutableVectorIterator<T>::hasNext() const \fn template <class T> bool QMutableSetIterator<T>::hasNext() const @@ -701,7 +580,6 @@ */ /*! \fn template <class T> const T &QListIterator<T>::next() - \fn template <class T> const T &QLinkedListIterator<T>::next() \fn template <class T> const T &QVectorIterator<T>::next() \fn template <class T> const T &QSetIterator<T>::next() \fn template <class T> const T &QMutableSetIterator<T>::next() @@ -715,7 +593,6 @@ */ /*! \fn template <class T> T &QMutableListIterator<T>::next() - \fn template <class T> T &QMutableLinkedListIterator<T>::next() \fn template <class T> T &QMutableVectorIterator<T>::next() Returns a reference to the next item, and advances the iterator @@ -728,7 +605,6 @@ */ /*! \fn template <class T> const T &QListIterator<T>::peekNext() const - \fn template <class T> const T &QLinkedListIterator<T>::peekNext() const \fn template <class T> const T &QVectorIterator<T>::peekNext() const \fn template <class T> const T &QSetIterator<T>::peekNext() const \fn template <class T> const T &QMutableSetIterator<T>::peekNext() const @@ -742,7 +618,6 @@ */ /*! \fn template <class T> T &QMutableListIterator<T>::peekNext() const - \fn template <class T> T &QMutableLinkedListIterator<T>::peekNext() const \fn template <class T> T &QMutableVectorIterator<T>::peekNext() const Returns a reference to the next item, without moving the iterator. @@ -754,11 +629,9 @@ */ /*! \fn template <class T> bool QListIterator<T>::hasPrevious() const - \fn template <class T> bool QLinkedListIterator<T>::hasPrevious() const \fn template <class T> bool QVectorIterator<T>::hasPrevious() const \fn template <class T> bool QSetIterator<T>::hasPrevious() const \fn template <class T> bool QMutableListIterator<T>::hasPrevious() const - \fn template <class T> bool QMutableLinkedListIterator<T>::hasPrevious() const \fn template <class T> bool QMutableVectorIterator<T>::hasPrevious() const \fn template <class T> bool QMutableSetIterator<T>::hasPrevious() const @@ -770,7 +643,6 @@ */ /*! \fn template <class T> const T &QListIterator<T>::previous() - \fn template <class T> const T &QLinkedListIterator<T>::previous() \fn template <class T> const T &QVectorIterator<T>::previous() \fn template <class T> const T &QSetIterator<T>::previous() \fn template <class T> const T &QMutableSetIterator<T>::previous() @@ -785,7 +657,6 @@ */ /*! \fn template <class T> T &QMutableListIterator<T>::previous() - \fn template <class T> T &QMutableLinkedListIterator<T>::previous() \fn template <class T> T &QMutableVectorIterator<T>::previous() Returns a reference to the previous item and moves the iterator @@ -798,7 +669,6 @@ */ /*! \fn template <class T> const T &QListIterator<T>::peekPrevious() const - \fn template <class T> const T &QLinkedListIterator<T>::peekPrevious() const \fn template <class T> const T &QVectorIterator<T>::peekPrevious() const \fn template <class T> const T &QSetIterator<T>::peekPrevious() const \fn template <class T> const T &QMutableSetIterator<T>::peekPrevious() const @@ -812,7 +682,6 @@ */ /*! \fn template <class T> T &QMutableListIterator<T>::peekPrevious() const - \fn template <class T> T &QMutableLinkedListIterator<T>::peekPrevious() const \fn template <class T> T &QMutableVectorIterator<T>::peekPrevious() const Returns a reference to the previous item, without moving the iterator. @@ -824,11 +693,9 @@ */ /*! \fn template <class T> bool QListIterator<T>::findNext(const T &value) - \fn template <class T> bool QLinkedListIterator<T>::findNext(const T &value) \fn template <class T> bool QVectorIterator<T>::findNext(const T &value) \fn template <class T> bool QSetIterator<T>::findNext(const T &value) \fn template <class T> bool QMutableListIterator<T>::findNext(const T &value) - \fn template <class T> bool QMutableLinkedListIterator<T>::findNext(const T &value) \fn template <class T> bool QMutableVectorIterator<T>::findNext(const T &value) \fn template <class T> bool QMutableSetIterator<T>::findNext(const T &value) @@ -843,11 +710,9 @@ */ /*! \fn template <class T> bool QListIterator<T>::findPrevious(const T &value) - \fn template <class T> bool QLinkedListIterator<T>::findPrevious(const T &value) \fn template <class T> bool QVectorIterator<T>::findPrevious(const T &value) \fn template <class T> bool QSetIterator<T>::findPrevious(const T &value) \fn template <class T> bool QMutableListIterator<T>::findPrevious(const T &value) - \fn template <class T> bool QMutableLinkedListIterator<T>::findPrevious(const T &value) \fn template <class T> bool QMutableVectorIterator<T>::findPrevious(const T &value) \fn template <class T> bool QMutableSetIterator<T>::findPrevious(const T &value) @@ -873,17 +738,6 @@ \sa insert(), setValue() */ -/*! \fn template <class T> void QMutableLinkedListIterator<T>::remove() - - Removes the last item that was jumped over using one of the - traversal functions (next(), previous(), findNext(), findPrevious()). - - Example: - \snippet code/doc_src_qiterator.cpp 20 - - \sa insert(), setValue() -*/ - /*! \fn template <class T> void QMutableVectorIterator<T>::remove() Removes the last item that was jumped over using one of the @@ -920,20 +774,6 @@ \sa value(), remove(), insert() */ -/*! \fn template <class T> void QMutableLinkedListIterator<T>::setValue(const T &value) const - - Replaces the value of the last item that was jumped over using - one of the traversal functions with \a value. - - The traversal functions are next(), previous(), findNext(), and - findPrevious(). - - Example: - \snippet code/doc_src_qiterator.cpp 24 - - \sa value(), remove(), insert() -*/ - /*! \fn template <class T> void QMutableVectorIterator<T>::setValue(const T &value) const Replaces the value of the last item that was jumped over using @@ -949,7 +789,6 @@ */ /*! \fn template <class T> const T &QMutableListIterator<T>::value() const - \fn template <class T> const T &QMutableLinkedListIterator<T>::value() const \fn template <class T> const T &QMutableVectorIterator<T>::value() const \fn template <class T> const T &QMutableSetIterator<T>::value() const @@ -964,7 +803,6 @@ /*! \fn template <class T> T &QMutableListIterator<T>::value() - \fn template <class T> T &QMutableLinkedListIterator<T>::value() \fn template <class T> T &QMutableVectorIterator<T>::value() \overload @@ -973,7 +811,6 @@ */ /*! \fn template <class T> void QMutableListIterator<T>::insert(const T &value) - \fn template <class T> void QMutableLinkedListIterator<T>::insert(const T &value) \fn template <class T> void QMutableVectorIterator<T>::insert(const T &value) Inserts \a value at the current iterator position. After the diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp deleted file mode 100644 index 6a423545da..0000000000 --- a/src/corelib/tools/qlinkedlist.cpp +++ /dev/null @@ -1,1238 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifdef QT_NO_LINKED_LIST -# undef QT_NO_LINKED_LIST -#endif - -#include "qlinkedlist.h" - -QT_BEGIN_NAMESPACE - -#if QT_DEPRECATED_SINCE(5, 15) - -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED - -const QLinkedListData QLinkedListData::shared_null = { - const_cast<QLinkedListData *>(&QLinkedListData::shared_null), - const_cast<QLinkedListData *>(&QLinkedListData::shared_null), - Q_REFCOUNT_INITIALIZE_STATIC, 0, true -}; - -/*! \class QLinkedList - \inmodule QtCore - \obsolete - \brief The QLinkedList class is a template class that provides linked lists. - - \ingroup tools - \ingroup shared - - \reentrant - - \note This class is obsolete, please use std::list instead. - - QLinkedList\<T\> is one of Qt's generic \l{container classes}. It - stores a list of values and provides iterator-based access as - well as \l{constant time} insertions and removals. - - QList\<T\>, QLinkedList\<T\>, and QVector\<T\> provide similar - functionality. Here's an overview: - - \list - \li For most purposes, QList is the right class to use. Its - index-based API is more convenient than QLinkedList's - iterator-based API, and it is usually faster than - QVector because of the way it stores its items in - memory (see \l{Algorithmic Complexity} for details). - It also expands to less code in your executable. - \li If you need a real linked list, with guarantees of \l{constant - time} insertions in the middle of the list and iterators to - items rather than indexes, use QLinkedList. - \li If you want the items to occupy adjacent memory positions, - use QVector. - \endlist - - Here's an example of a QLinkedList that stores integers and a - QLinkedList that stores QTime values: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 0 - - QLinkedList stores a list of items. The default constructor - creates an empty list. To insert items into the list, you can use - operator<<(): - - \snippet code/src_corelib_tools_qlinkedlist.cpp 1 - - If you want to get the first or last item in a linked list, use - first() or last(). If you want to remove an item from either end - of the list, use removeFirst() or removeLast(). If you want to - remove all occurrences of a given value in the list, use - removeAll(). - - A common requirement is to remove the first or last item in the - list and do something with it. For this, QLinkedList provides - takeFirst() and takeLast(). Here's a loop that removes the items - from a list one at a time and calls \c delete on them: - \snippet code/src_corelib_tools_qlinkedlist.cpp 2 - - QLinkedList's value type must be an \l {assignable data type}. This - covers most data types that are commonly used, but the compiler - won't let you, for example, store a QWidget as a value; instead, - store a QWidget *. A few functions have additional requirements; - for example, contains() and removeAll() expect the value type to - support \c operator==(). These requirements are documented on a - per-function basis. - - If you want to insert, modify, or remove items in the middle of - the list, you must use an iterator. QLinkedList provides both - \l{Java-style iterators} (QLinkedListIterator and - QMutableLinkedListIterator) and \l{STL-style iterators} - (QLinkedList::const_iterator and QLinkedList::iterator). See the - documentation for these classes for details. - - \sa QLinkedListIterator, QMutableLinkedListIterator, QList, QVector -*/ - -/*! \fn template <class T> QLinkedList<T>::QLinkedList() - - Constructs an empty list. -*/ - -/*! - \fn template <class T> QLinkedList<T>::QLinkedList(QLinkedList<T> &&other) - - Move-constructs a QLinkedList instance, making it point at the same - object that \a other was pointing to. - - \since 5.2 -*/ - -/*! \fn template <class T> QLinkedList<T>::QLinkedList(const QLinkedList<T> &other) - - Constructs a copy of \a other. - - This operation occurs in \l{constant time}, because QLinkedList - is \l{implicitly shared}. This makes returning a QLinkedList from - a function very fast. If a shared instance is modified, it will - be copied (copy-on-write), and this takes \l{linear time}. - - \sa operator=() -*/ - -/*! \fn template <class T> QLinkedList<T>::QLinkedList(std::initializer_list<T> list) - \since 5.2 - - Constructs a list from the std::initializer_list specified by \a list. - - This constructor is only enabled if the compiler supports C++11 - initializer lists. -*/ - -/*! \fn template <class T> template<typename InputIterator> QLinkedList<T>::QLinkedList(InputIterator first, InputIterator last) - \since 5.14 - - Constructs a list with the contents in the iterator range [\a first, \a last). - - The value type of \c InputIterator must be convertible to \c T. -*/ - -/*! \fn template <class T> QLinkedList<T>::~QLinkedList() - - Destroys the list. References to the values in the list, and all - iterators over this list, become invalid. -*/ - -/*! \fn template <class T> QLinkedList<T> &QLinkedList<T>::operator=(const QLinkedList<T> &other) - - Assigns \a other to this list and returns a reference to this - list. -*/ - -/*! \fn template <class T> void QLinkedList<T>::swap(QLinkedList<T> &other) - \since 4.8 - - Swaps list \a other with this list. This operation is very - fast and never fails. -*/ - -/*! \fn template <class T> bool QLinkedList<T>::operator==(const QLinkedList<T> &other) const - - Returns \c true if \a other is equal to this list; otherwise returns - false. - - Two lists are considered equal if they contain the same values in - the same order. - - This function requires the value type to implement \c - operator==(). - - \sa operator!=() -*/ - -/*! \fn template <class T> bool QLinkedList<T>::operator!=(const QLinkedList<T> &other) const - - Returns \c true if \a other is not equal to this list; otherwise - returns \c false. - - Two lists are considered equal if they contain the same values in - the same order. - - This function requires the value type to implement \c - operator==(). - - \sa operator==() -*/ - -/*! \fn template <class T> int QLinkedList<T>::size() const - - Returns the number of items in the list. - - \sa isEmpty(), count() -*/ - -/*! \fn template <class T> void QLinkedList<T>::detach() - - \internal -*/ - -/*! \fn template <class T> bool QLinkedList<T>::isDetached() const - - \internal -*/ - -/*! \fn template <class T> void QLinkedList<T>::setSharable(bool sharable) - - \internal -*/ - -/*! \fn template <class T> bool QLinkedList<T>::isSharedWith(const QLinkedList<T> &other) const - - \internal -*/ - -/*! \fn template <class T> bool QLinkedList<T>::isEmpty() const - - Returns \c true if the list contains no items; otherwise returns - false. - - \sa size() -*/ - -/*! \fn template <class T> void QLinkedList<T>::clear() - - Removes all the items in the list. - - \sa removeAll() -*/ - -/*! \fn template <class T> void QLinkedList<T>::append(const T &value) - - Inserts \a value at the end of the list. - - Example: - \snippet code/src_corelib_tools_qlinkedlist.cpp 3 - - This is the same as list.insert(end(), \a value). - - \sa operator<<(), prepend(), insert() -*/ - -/*! \fn template <class T> void QLinkedList<T>::prepend(const T &value) - - Inserts \a value at the beginning of the list. - - Example: - \snippet code/src_corelib_tools_qlinkedlist.cpp 4 - - This is the same as list.insert(begin(), \a value). - - \sa append(), insert() -*/ - -/*! \fn template <class T> int QLinkedList<T>::removeAll(const T &value) - - Removes all occurrences of \a value in the list. - - Example: - \snippet code/src_corelib_tools_qlinkedlist.cpp 5 - - This function requires the value type to have an implementation of - \c operator==(). - - \sa insert() -*/ - -/*! - \fn template <class T> bool QLinkedList<T>::removeOne(const T &value) - \since 4.4 - - Removes the first occurrences of \a value in the list. Returns \c true on - success; otherwise returns \c false. - - Example: - \snippet code/src_corelib_tools_qlinkedlist.cpp 6 - - This function requires the value type to have an implementation of - \c operator==(). - - \sa insert() -*/ - -/*! \fn template <class T> bool QLinkedList<T>::contains(const T &value) const - - Returns \c true if the list contains an occurrence of \a value; - otherwise returns \c false. - - This function requires the value type to have an implementation of - \c operator==(). - - \sa QLinkedListIterator::findNext(), QLinkedListIterator::findPrevious() -*/ - -/*! \fn template <class T> int QLinkedList<T>::count(const T &value) const - - Returns the number of occurrences of \a value in the list. - - This function requires the value type to have an implementation of - \c operator==(). - - \sa contains() -*/ - -/*! \fn template <class T> bool QLinkedList<T>::startsWith(const T &value) const - \since 4.5 - - Returns \c true if the list is not empty and its first - item is equal to \a value; otherwise returns \c false. - - \sa isEmpty(), first() -*/ - -/*! \fn template <class T> bool QLinkedList<T>::endsWith(const T &value) const - \since 4.5 - - Returns \c true if the list is not empty and its last - item is equal to \a value; otherwise returns \c false. - - \sa isEmpty(), last() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::begin() - - Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in - the list. - - \sa constBegin(), end() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::begin() const - - \overload -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::cbegin() const - \since 5.0 - - Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item - in the list. - - \sa begin(), cend() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::constBegin() const - - Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item - in the list. - - \sa begin(), constEnd() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::end() - - Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item - after the last item in the list. - - \sa begin(), constEnd() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::end() const - - \overload -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::cend() const - \since 5.0 - - Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary - item after the last item in the list. - - \sa cbegin(), end() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::constEnd() const - - Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary - item after the last item in the list. - - \sa constBegin(), end() -*/ - -/*! \fn template <class T> QLinkedList<T>::reverse_iterator QLinkedList<T>::rbegin() - \since 5.6 - - Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to the first - item in the list, in reverse order. - - \sa begin(), crbegin(), rend() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_reverse_iterator QLinkedList<T>::rbegin() const - \since 5.6 - \overload -*/ - -/*! \fn template <class T> QLinkedList<T>::const_reverse_iterator QLinkedList<T>::crbegin() const - \since 5.6 - - Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to the first - item in the list, in reverse order. - - \sa begin(), rbegin(), rend() -*/ - -/*! \fn template <class T> QLinkedList<T>::reverse_iterator QLinkedList<T>::rend() - \since 5.6 - - Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to one past - the last item in the list, in reverse order. - - \sa end(), crend(), rbegin() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_reverse_iterator QLinkedList<T>::rend() const - \since 5.6 - \overload -*/ - -/*! \fn template <class T> QLinkedList<T>::const_reverse_iterator QLinkedList<T>::crend() const - \since 5.6 - - Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to one - past the last item in the list, in reverse order. - - \sa end(), rend(), rbegin() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::insert(iterator before, const T &value) - - Inserts \a value in front of the item pointed to by the iterator - \a before. Returns an iterator pointing at the inserted item. - - \sa erase() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::erase(iterator pos) - - Removes the item pointed to by the iterator \a pos from the list, - and returns an iterator to the next item in the list (which may be - end()). - - \sa insert() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::erase(iterator begin, iterator end) - - \overload - - Removes all the items from \a begin up to (but not including) \a - end. -*/ - -/*! \typedef QLinkedList::Iterator - - Qt-style synonym for QLinkedList::iterator. -*/ - -/*! \typedef QLinkedList::ConstIterator - - Qt-style synonym for QLinkedList::const_iterator. -*/ - -/*! \typedef QLinkedList::reverse_iterator - \since 5.6 - - The QLinkedList::reverse_iterator typedef provides an STL-style non-const - reverse iterator for QLinkedList. - - It is simply a typedef for \c{std::reverse_iterator<QLinkedList::iterator>}. - - \warning Iterators on implicitly shared containers do not work - exactly like STL-iterators. You should avoid copying a container - while iterators are active on that container. For more information, - read \l{Implicit sharing iterator problem}. - - \sa QLinkedList::rbegin(), QLinkedList::rend(), QLinkedList::const_reverse_iterator, QLinkedList::iterator -*/ - -/*! \typedef QLinkedList::const_reverse_iterator - \since 5.6 - - The QLinkedList::const_reverse_iterator typedef provides an STL-style const - reverse iterator for QLinkedList. - - It is simply a typedef for \c{std::reverse_iterator<QLinkedList::const_iterator>}. - - \warning Iterators on implicitly shared containers do not work - exactly like STL-iterators. You should avoid copying a container - while iterators are active on that container. For more information, - read \l{Implicit sharing iterator problem}. - - \sa QLinkedList::rbegin(), QLinkedList::rend(), QLinkedList::reverse_iterator, QLinkedList::const_iterator -*/ - -/*! - \typedef QLinkedList::size_type - - Typedef for int. Provided for STL compatibility. -*/ - -/*! - \typedef QLinkedList::value_type - - Typedef for T. Provided for STL compatibility. -*/ - -/*! - \typedef QLinkedList::pointer - - Typedef for T *. Provided for STL compatibility. -*/ - -/*! - \typedef QLinkedList::const_pointer - - Typedef for const T *. Provided for STL compatibility. -*/ - -/*! - \typedef QLinkedList::reference - - Typedef for T &. Provided for STL compatibility. -*/ - -/*! - \typedef QLinkedList::const_reference - - Typedef for const T &. Provided for STL compatibility. -*/ - -/*! - \typedef QLinkedList::difference_type - - Typedef for ptrdiff_t. Provided for STL compatibility. -*/ - -/*! \fn template <class T> int QLinkedList<T>::count() const - - Same as size(). -*/ - -/*! \fn template <class T> T& QLinkedList<T>::first() - - Returns a reference to the first item in the list. This function - assumes that the list isn't empty. - - \sa last(), isEmpty() -*/ - -/*! \fn template <class T> const T& QLinkedList<T>::first() const - - \overload -*/ - -/*! \fn template <class T> T& QLinkedList<T>::last() - - Returns a reference to the last item in the list. This function - assumes that the list isn't empty. - - \sa first(), isEmpty() -*/ - -/*! \fn template <class T> const T& QLinkedList<T>::last() const - - \overload -*/ - -/*! \fn template <class T> void QLinkedList<T>::removeFirst() - - Removes the first item in the list. - - This is the same as erase(begin()). - - \sa removeLast(), erase() -*/ - -/*! \fn template <class T> void QLinkedList<T>::removeLast() - - Removes the last item in the list. - - \sa removeFirst(), erase() -*/ - -/*! \fn template <class T> T QLinkedList<T>::takeFirst() - - Removes the first item in the list and returns it. - - If you don't use the return value, removeFirst() is more - efficient. - - \sa takeLast(), removeFirst() -*/ - -/*! \fn template <class T> T QLinkedList<T>::takeLast() - - Removes the last item in the list and returns it. - - If you don't use the return value, removeLast() is more - efficient. - - \sa takeFirst(), removeLast() -*/ - -/*! \fn template <class T> void QLinkedList<T>::push_back(const T &value) - - This function is provided for STL compatibility. It is equivalent - to append(\a value). -*/ - -/*! \fn template <class T> void QLinkedList<T>::push_front(const T &value) - - This function is provided for STL compatibility. It is equivalent - to prepend(\a value). -*/ - -/*! \fn template <class T> T& QLinkedList<T>::front() - - This function is provided for STL compatibility. It is equivalent - to first(). -*/ - -/*! \fn template <class T> const T& QLinkedList<T>::front() const - - \overload -*/ - -/*! \fn template <class T> T& QLinkedList<T>::back() - - This function is provided for STL compatibility. It is equivalent - to last(). -*/ - -/*! \fn template <class T> const T& QLinkedList<T>::back() const - - \overload -*/ - -/*! \fn template <class T> void QLinkedList<T>::pop_front() - - This function is provided for STL compatibility. It is equivalent - to removeFirst(). -*/ - -/*! \fn template <class T> void QLinkedList<T>::pop_back() - - This function is provided for STL compatibility. It is equivalent - to removeLast(). -*/ - -/*! \fn template <class T> bool QLinkedList<T>::empty() const - - This function is provided for STL compatibility. It is equivalent - to isEmpty() and returns \c true if the list is empty. -*/ - -/*! \fn template <class T> QLinkedList<T> &QLinkedList<T>::operator+=(const QLinkedList<T> &other) - - Appends the items of the \a other list to this list and returns a - reference to this list. - - \sa operator+(), append() -*/ - -/*! \fn template <class T> void QLinkedList<T>::operator+=(const T &value) - - \overload - - Appends \a value to the list. -*/ - -/*! \fn template <class T> QLinkedList<T> QLinkedList<T>::operator+(const QLinkedList<T> &other) const - - Returns a list that contains all the items in this list followed - by all the items in the \a other list. - - \sa operator+=() -*/ - -/*! \fn template <class T> QLinkedList<T> &QLinkedList<T>::operator<<(const QLinkedList<T> &other) - - Appends the items of the \a other list to this list and returns a - reference to this list. - - \sa operator+=(), append() -*/ - -/*! \fn template <class T> QLinkedList<T> &QLinkedList<T>::operator<<(const T &value) - - \overload - - Appends \a value to the list. -*/ - -/*! \class QLinkedList::iterator - \inmodule QtCore - \obsolete - \brief The QLinkedList::iterator class provides an STL-style non-const iterator for QLinkedList. - - QLinkedList features both \l{STL-style iterators} and - \l{Java-style iterators}. The STL-style iterators are more - low-level and more cumbersome to use; on the other hand, they are - slightly faster and, for developers who already know STL, have - the advantage of familiarity. - - QLinkedList\<T\>::iterator allows you to iterate over a - QLinkedList\<T\> and to modify the list item associated with the - iterator. If you want to iterate over a const QLinkedList, use - QLinkedList::const_iterator instead. It is generally good - practice to use QLinkedList::const_iterator on a non-const - QLinkedList as well, unless you need to change the QLinkedList - through the iterator. Const iterators are slightly faster, and - can improve code readability. - - The default QLinkedList::iterator constructor creates an - uninitialized iterator. You must initialize it using a - function like QLinkedList::begin(), QLinkedList::end(), or - QLinkedList::insert() before you can start iterating. Here's a - typical loop that prints all the items stored in a list: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 7 - - STL-style iterators can be used as arguments to \l{generic - algorithms}. For example, here's how to find an item in the list: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 8 - - Let's see a few examples of things we can do with a - QLinkedList::iterator that we cannot do with a QLinkedList::const_iterator. - Here's an example that increments every value stored in a - QLinkedList\<int\> by 2: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 9 - - Here's an example that removes all the items that start with an - underscore character in a QLinkedList\<QString\>: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 10 - - The call to QLinkedList::erase() removes the item pointed to by - the iterator from the list, and returns an iterator to the next - item. Here's another way of removing an item while iterating: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 11 - - It might be tempting to write code like this: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 12 - - However, this will potentially crash in \c{++i}, because \c i is - a dangling iterator after the call to erase(). - - Multiple iterators can be used on the same list. If you add items - to the list, existing iterators will remain valid. If you remove - items from the list, iterators that point to the removed items - will become dangling iterators. - - \warning Iterators on implicitly shared containers do not work - exactly like STL-iterators. You should avoid copying a container - while iterators are active on that container. For more information, - read \l{Implicit sharing iterator problem}. - - \sa QLinkedList::const_iterator, QMutableLinkedListIterator -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator::iterator() - - Constructs an uninitialized iterator. - - Functions like operator*() and operator++() should not be called - on an uninitialized iterator. Use operator=() to assign a value - to it before using it. - - \sa QLinkedList::begin(), QLinkedList::end() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator::iterator(Node *node) - - \internal -*/ - -/*! \typedef QLinkedList::iterator::iterator_category - - \internal -*/ - -/*! \typedef QLinkedList::iterator::difference_type - - \internal -*/ - -/*! \typedef QLinkedList::iterator::value_type - - \internal -*/ - -/*! \typedef QLinkedList::iterator::pointer - - \internal -*/ - -/*! \typedef QLinkedList::iterator::reference - - \internal -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator::iterator(const iterator &other) - - Constructs a copy of \a other. -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator &QLinkedList<T>::iterator::operator=(const iterator &other) - - Assigns \a other to this iterator. -*/ - -/*! - \fn template <class T> QLinkedList<T> &QLinkedList<T>::operator=(QLinkedList<T> &&other) - - Move-assigns \a other to this QLinkedList instance. - - \since 5.2 -*/ - -/*! \fn template <class T> T &QLinkedList<T>::iterator::operator*() const - - Returns a modifiable reference to the current item. - - You can change the value of an item by using operator*() on the - left side of an assignment, for example: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 13 - - \sa operator->() -*/ - -/*! \fn template <class T> T *QLinkedList<T>::iterator::operator->() const - - Returns a pointer to the current item. - - \sa operator*() -*/ - -/*! - \fn template <class T> bool QLinkedList<T>::iterator::operator==(const iterator &other) const - \fn template <class T> bool QLinkedList<T>::iterator::operator==(const const_iterator &other) const - - Returns \c true if \a other points to the same item as this - iterator; otherwise returns \c false. - - \sa operator!=() -*/ - -/*! - \fn template <class T> bool QLinkedList<T>::iterator::operator!=(const iterator &other) const - \fn template <class T> bool QLinkedList<T>::iterator::operator!=(const const_iterator &other) const - - Returns \c true if \a other points to a different item than this - iterator; otherwise returns \c false. - - \sa operator==() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator &QLinkedList<T>::iterator::operator++() - - The prefix ++ operator (\c{++it}) advances the iterator to the - next item in the list and returns an iterator to the new current - item. - - Calling this function on QLinkedList::end() leads to undefined - results. - - \sa operator--() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::iterator::operator++(int) - - \overload - - The postfix ++ operator (\c{it++}) advances the iterator to the - next item in the list and returns an iterator to the previously - current item. -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator &QLinkedList<T>::iterator::operator--() - - The prefix -- operator (\c{--it}) makes the preceding item - current and returns an iterator to the new current item. - - Calling this function on QLinkedList::begin() leads to undefined - results. - - \sa operator++() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::iterator::operator--(int) - - \overload - - The postfix -- operator (\c{it--}) makes the preceding item - current and returns an iterator to the previously current item. -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::iterator::operator+(int j) const - - Returns an iterator to the item at \a j positions forward from - this iterator. (If \a j is negative, the iterator goes backward.) - - This operation can be slow for large \a j values. - - \sa operator-() - -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator QLinkedList<T>::iterator::operator-(int j) const - - Returns an iterator to the item at \a j positions backward from - this iterator. (If \a j is negative, the iterator goes forward.) - - This operation can be slow for large \a j values. - - \sa operator+() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator &QLinkedList<T>::iterator::operator+=(int j) - - Advances the iterator by \a j items. (If \a j is negative, the - iterator goes backward.) - - \sa operator-=(), operator+() -*/ - -/*! \fn template <class T> QLinkedList<T>::iterator &QLinkedList<T>::iterator::operator-=(int j) - - Makes the iterator go back by \a j items. (If \a j is negative, - the iterator goes forward.) - - \sa operator+=(), operator-() -*/ - -/*! \class QLinkedList::const_iterator - \inmodule QtCore - \obsolete - \brief The QLinkedList::const_iterator class provides an STL-style const iterator for QLinkedList. - - QLinkedList features both \l{STL-style iterators} and - \l{Java-style iterators}. The STL-style iterators are more - low-level and more cumbersome to use; on the other hand, they are - slightly faster and, for developers who already know STL, have - the advantage of familiarity. - - QLinkedList\<T\>::const_iterator allows you to iterate over a - QLinkedList\<T\>. If you want modify the QLinkedList as you iterate - over it, you must use QLinkedList::iterator instead. It is - generally good practice to use QLinkedList::const_iterator on a - non-const QLinkedList as well, unless you need to change the - QLinkedList through the iterator. Const iterators are slightly - faster, and can improve code readability. - - The default QLinkedList::const_iterator constructor creates an - uninitialized iterator. You must initialize it using a function - like QLinkedList::constBegin(), QLinkedList::constEnd(), or - QLinkedList::insert() before you can start iterating. Here's a - typical loop that prints all the items stored in a list: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 14 - - STL-style iterators can be used as arguments to \l{generic - algorithms}. For example, here's how to find an item in the list: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 15 - - Multiple iterators can be used on the same list. If you add items - to the list, existing iterators will remain valid. If you remove - items from the list, iterators that point to the removed items - will become dangling iterators. - - \warning Iterators on implicitly shared containers do not work - exactly like STL-iterators. You should avoid copying a container - while iterators are active on that container. For more information, - read \l{Implicit sharing iterator problem}. - - \sa QLinkedList::iterator, QLinkedListIterator -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator::const_iterator() - - Constructs an uninitialized iterator. - - Functions like operator*() and operator++() should not be called - on an uninitialized iterator. Use operator=() to assign a value - to it before using it. - - \sa QLinkedList::constBegin(), QLinkedList::constEnd() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator::const_iterator(Node *node) - - \internal -*/ - -/*! \typedef QLinkedList::const_iterator::iterator_category - - \internal -*/ - -/*! \typedef QLinkedList::const_iterator::difference_type - - \internal -*/ - -/*! \typedef QLinkedList::const_iterator::value_type - - \internal -*/ - -/*! \typedef QLinkedList::const_iterator::pointer - - \internal -*/ - -/*! \typedef QLinkedList::const_iterator::reference - - \internal -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator::const_iterator(const const_iterator &other) - - Constructs a copy of \a other. -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator::const_iterator(iterator other) - - Constructs a copy of \a other. -*/ - -/*! \fn template <class T> typename QLinkedList<T>::const_iterator &QLinkedList<T>::const_iterator::operator=(const const_iterator &other) - - Assigns \a other to this iterator. -*/ - -/*! \fn template <class T> const T &QLinkedList<T>::const_iterator::operator*() const - - Returns a reference to the current item. - - \sa operator->() -*/ - -/*! \fn template <class T> const T *QLinkedList<T>::const_iterator::operator->() const - - Returns a pointer to the current item. - - \sa operator*() -*/ - -/*! \fn template <class T> bool QLinkedList<T>::const_iterator::operator==(const const_iterator &other) const - - Returns \c true if \a other points to the same item as this - iterator; otherwise returns \c false. - - \sa operator!=() -*/ - -/*! \fn template <class T> bool QLinkedList<T>::const_iterator::operator!=(const const_iterator &other) const - - Returns \c true if \a other points to a different item than this - iterator; otherwise returns \c false. - - \sa operator==() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator &QLinkedList<T>::const_iterator::operator++() - - The prefix ++ operator (\c{++it}) advances the iterator to the - next item in the list and returns an iterator to the new current - item. - - Calling this function on QLinkedList<T>::constEnd() leads to - undefined results. - - \sa operator--() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::const_iterator::operator++(int) - - \overload - - The postfix ++ operator (\c{it++}) advances the iterator to the - next item in the list and returns an iterator to the previously - current item. -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator &QLinkedList<T>::const_iterator::operator--() - - The prefix -- operator (\c{--it}) makes the preceding item - current and returns an iterator to the new current item. - - Calling this function on QLinkedList::begin() leads to undefined - results. - - \sa operator++() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::const_iterator::operator--(int) - - \overload - - The postfix -- operator (\c{it--}) makes the preceding item - current and returns an iterator to the previously current item. -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::const_iterator::operator+(int j) const - - Returns an iterator to the item at \a j positions forward from - this iterator. (If \a j is negative, the iterator goes backward.) - - This operation can be slow for large \a j values. - - \sa operator-() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator QLinkedList<T>::const_iterator::operator-(int j) const - - This function returns an iterator to the item at \a j positions backward from - this iterator. (If \a j is negative, the iterator goes forward.) - - This operation can be slow for large \a j values. - - \sa operator+() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator &QLinkedList<T>::const_iterator::operator+=(int j) - - Advances the iterator by \a j items. (If \a j is negative, the - iterator goes backward.) - - This operation can be slow for large \a j values. - - \sa operator-=(), operator+() -*/ - -/*! \fn template <class T> QLinkedList<T>::const_iterator &QLinkedList<T>::const_iterator::operator-=(int j) - - Makes the iterator go back by \a j items. (If \a j is negative, - the iterator goes forward.) - - This operation can be slow for large \a j values. - - \sa operator+=(), operator-() -*/ - -/*! \fn template <class T> QDataStream &operator<<(QDataStream &out, const QLinkedList<T> &list) - \relates QLinkedList - - Writes the linked list \a list to stream \a out. - - This function requires the value type to implement \c - operator<<(). - - \sa{Serializing Qt Data Types}{Format of the QDataStream operators} -*/ - -/*! \fn template <class T> QDataStream &operator>>(QDataStream &in, QLinkedList<T> &list) - \relates QLinkedList - - Reads a linked list from stream \a in into \a list. - - This function requires the value type to implement \c operator>>(). - - \sa{Serializing Qt Data Types}{Format of the QDataStream operators} -*/ - -/*! - \since 4.1 - \fn template <class T> QLinkedList<T> QLinkedList<T>::fromStdList(const std::list<T> &list) - - Returns a QLinkedList object with the data contained in \a list. - The order of the elements in the QLinkedList is the same as in \a - list. - - Example: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 16 - - \sa toStdList() -*/ - -/*! - \since 4.1 - \fn template <class T> std::list<T> QLinkedList<T>::toStdList() const - - Returns a std::list object with the data contained in this - QLinkedList. Example: - - \snippet code/src_corelib_tools_qlinkedlist.cpp 17 - - \sa fromStdList() -*/ - -QT_WARNING_POP - -#endif // QT_DEPRECATED_SINCE(5, 15) - -QT_END_NAMESPACE diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h deleted file mode 100644 index fd3df74059..0000000000 --- a/src/corelib/tools/qlinkedlist.h +++ /dev/null @@ -1,612 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QLINKEDLIST_H -#define QLINKEDLIST_H - -#include <QtCore/qglobal.h> - -#ifndef QT_NO_LINKED_LIST - -#include <QtCore/qiterator.h> -#include <QtCore/qrefcount.h> -#include <QtCore/qcontainertools_impl.h> -#include <QtCore/qdatastream.h> -#include <QtCore/qtypeinfo.h> - -#include <algorithm> -#include <initializer_list> -#include <iterator> -#include <list> - - -#if 0 -// This is needed because of QTBUG-80347 -#pragma qt_class(QLinkedList) -#pragma qt_class(QLinkedListData) -#pragma qt_class(QLinkedListNode) -#endif - -#if QT_DEPRECATED_SINCE(5, 15) - -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED - -QT_BEGIN_NAMESPACE - -struct QT_DEPRECATED_VERSION_5_15 Q_CORE_EXPORT QLinkedListData -{ - QLinkedListData *n, *p; - QtPrivate::RefCount ref; - int size; - uint sharable : 1; - - static const QLinkedListData shared_null; -}; - -template <typename T> -struct QT_DEPRECATED_VERSION_5_15 QLinkedListNode -{ - inline QLinkedListNode(const T &arg): t(arg) { } - QLinkedListNode *n, *p; - T t; -}; - -template <class T> -class QT_DEPRECATED_VERSION_X_5_15("Use std::list instead") QLinkedList -{ - typedef QLinkedListNode<T> Node; - union { QLinkedListData *d; QLinkedListNode<T> *e; }; - -public: - inline QLinkedList() noexcept : d(const_cast<QLinkedListData *>(&QLinkedListData::shared_null)) { } - inline QLinkedList(const QLinkedList<T> &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach(); } - inline QLinkedList(std::initializer_list<T> list) - : QLinkedList(list.begin(), list.end()) {} - template <typename InputIterator, QtPrivate::IfIsInputIterator<InputIterator> = true> - inline QLinkedList(InputIterator first, InputIterator last) - : QLinkedList() - { - std::copy(first, last, std::back_inserter(*this)); - } - ~QLinkedList(); - QLinkedList<T> &operator=(const QLinkedList<T> &); - QLinkedList(QLinkedList<T> &&other) noexcept - : d(other.d) { other.d = const_cast<QLinkedListData *>(&QLinkedListData::shared_null); } - QLinkedList<T> &operator=(QLinkedList<T> &&other) noexcept - { QLinkedList moved(std::move(other)); swap(moved); return *this; } - inline void swap(QLinkedList<T> &other) noexcept { qSwap(d, other.d); } - bool operator==(const QLinkedList<T> &l) const; - inline bool operator!=(const QLinkedList<T> &l) const { return !(*this == l); } - - inline int size() const { return d->size; } - inline void detach() - { if (d->ref.isShared()) detach_helper2(this->e); } - inline bool isDetached() const { return !d->ref.isShared(); } - inline bool isSharedWith(const QLinkedList<T> &other) const { return d == other.d; } - - inline bool isEmpty() const { return d->size == 0; } - - void clear(); - - void append(const T &); - void prepend(const T &); - T takeFirst(); - T takeLast(); - int removeAll(const T &t); - bool removeOne(const T &t); - bool contains(const T &t) const; - int count(const T &t) const; - - class const_iterator; - - class iterator - { - public: - typedef std::bidirectional_iterator_tag iterator_category; - typedef qptrdiff difference_type; - typedef T value_type; - typedef T *pointer; - typedef T &reference; - Node *i; - inline iterator() : i(nullptr) {} - inline iterator(Node *n) : i(n) {} -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - iterator(const iterator &other) noexcept : i(other.i) {} - iterator &operator=(const iterator &other) noexcept { i = other.i; return *this; } - iterator(iterator &&other) noexcept : i(other.i) {} - iterator &operator=(iterator &&other) noexcept { return *this = other; } -#endif - inline T &operator*() const { return i->t; } - inline T *operator->() const { return &i->t; } - inline bool operator==(const iterator &o) const { return i == o.i; } - inline bool operator!=(const iterator &o) const { return i != o.i; } - inline bool operator==(const const_iterator &o) const - { return i == o.i; } - inline bool operator!=(const const_iterator &o) const - { return i != o.i; } - inline iterator &operator++() { i = i->n; return *this; } - inline iterator operator++(int) { Node *n = i; i = i->n; return n; } - inline iterator &operator--() { i = i->p; return *this; } - inline iterator operator--(int) { Node *n = i; i = i->p; return n; } - inline iterator operator+(int j) const - { Node *n = i; if (j > 0) while (j--) n = n->n; else while (j++) n = n->p; return n; } - inline iterator operator-(int j) const { return operator+(-j); } - inline iterator &operator+=(int j) { return *this = *this + j; } - inline iterator &operator-=(int j) { return *this = *this - j; } - friend inline iterator operator+(int j, iterator k) { return k + j; } - }; - friend class iterator; - - class const_iterator - { - public: - typedef std::bidirectional_iterator_tag iterator_category; - typedef qptrdiff difference_type; - typedef T value_type; - typedef const T *pointer; - typedef const T &reference; - Node *i; - inline const_iterator() : i(nullptr) {} - inline const_iterator(Node *n) : i(n) {} - inline const_iterator(iterator ci) : i(ci.i){} -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - const_iterator(const const_iterator &other) noexcept : i(other.i) {} - const_iterator &operator=(const const_iterator &other) noexcept { i = other.i; return *this; } - const_iterator(const_iterator &&other) noexcept : i(other.i) {} - const_iterator &operator=(const_iterator &&other) noexcept { return *this = other; } -#endif - inline const T &operator*() const { return i->t; } - inline const T *operator->() const { return &i->t; } - inline bool operator==(const const_iterator &o) const { return i == o.i; } - inline bool operator!=(const const_iterator &o) const { return i != o.i; } - inline const_iterator &operator++() { i = i->n; return *this; } - inline const_iterator operator++(int) { Node *n = i; i = i->n; return n; } - inline const_iterator &operator--() { i = i->p; return *this; } - inline const_iterator operator--(int) { Node *n = i; i = i->p; return n; } - inline const_iterator operator+(int j) const - { Node *n = i; if (j > 0) while (j--) n = n->n; else while (j++) n = n->p; return n; } - inline const_iterator operator-(int j) const { return operator+(-j); } - inline const_iterator &operator+=(int j) { return *this = *this + j; } - inline const_iterator &operator-=(int j) { return *this = *this - j; } - friend inline const_iterator operator+(int j, const_iterator k) { return k + j; } - }; - friend class const_iterator; - - // stl style - typedef std::reverse_iterator<iterator> reverse_iterator; - typedef std::reverse_iterator<const_iterator> const_reverse_iterator; - - inline iterator begin() { detach(); return e->n; } - inline const_iterator begin() const noexcept { return e->n; } - inline const_iterator cbegin() const noexcept { return e->n; } - inline const_iterator constBegin() const noexcept { return e->n; } - inline iterator end() { detach(); return e; } - inline const_iterator end() const noexcept { return e; } - inline const_iterator cend() const noexcept { return e; } - inline const_iterator constEnd() const noexcept { return e; } - - reverse_iterator rbegin() { return reverse_iterator(end()); } - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } - const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } - const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } - const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } - - iterator insert(iterator before, const T &t); - iterator erase(iterator pos); - iterator erase(iterator first, iterator last); - - // more Qt - typedef iterator Iterator; - typedef const_iterator ConstIterator; - inline int count() const { return d->size; } - inline T& first() { Q_ASSERT(!isEmpty()); return *begin(); } - inline const T& first() const { Q_ASSERT(!isEmpty()); return *begin(); } - T& last() { Q_ASSERT(!isEmpty()); return *(--end()); } - const T& last() const { Q_ASSERT(!isEmpty()); return *(--end()); } - inline void removeFirst() { Q_ASSERT(!isEmpty()); erase(begin()); } - inline void removeLast() { Q_ASSERT(!isEmpty()); erase(--end()); } - inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } - inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; } - - // stl compatibility - inline void push_back(const T &t) { append(t); } - inline void push_front(const T &t) { prepend(t); } - inline T& front() { return first(); } - inline const T& front() const { return first(); } - inline T& back() { return last(); } - inline const T& back() const { return last(); } - inline void pop_front() { removeFirst(); } - inline void pop_back() { removeLast(); } - inline bool empty() const { return isEmpty(); } - typedef int size_type; - typedef T value_type; - typedef value_type *pointer; - typedef const value_type *const_pointer; - typedef value_type &reference; - typedef const value_type &const_reference; - typedef qptrdiff difference_type; - - static inline QLinkedList<T> fromStdList(const std::list<T> &list) - { QLinkedList<T> tmp; std::copy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; } - inline std::list<T> toStdList() const - { std::list<T> tmp; std::copy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } - - // comfort - QLinkedList<T> &operator+=(const QLinkedList<T> &l); - QLinkedList<T> operator+(const QLinkedList<T> &l) const; - inline QLinkedList<T> &operator+=(const T &t) { append(t); return *this; } - inline QLinkedList<T> &operator<< (const T &t) { append(t); return *this; } - inline QLinkedList<T> &operator<<(const QLinkedList<T> &l) { *this += l; return *this; } - -private: - void detach_helper(); - iterator detach_helper2(iterator); - void freeData(QLinkedListData*); -}; -template <typename T> -Q_DECLARE_TYPEINFO_BODY(QLinkedList<T>, Q_MOVABLE_TYPE|Q_RELOCATABLE_TYPE); - -#if defined(__cpp_deduction_guides) && __cpp_deduction_guides >= 201606 -template <typename InputIterator, - typename ValueType = typename std::iterator_traits<InputIterator>::value_type, - QtPrivate::IfIsInputIterator<InputIterator> = true> -QLinkedList(InputIterator, InputIterator) -> QLinkedList<ValueType>; -#endif - -template <typename T> -inline QLinkedList<T>::~QLinkedList() -{ - if (!d->ref.deref()) - freeData(d); -} - -template <typename T> -void QLinkedList<T>::detach_helper() -{ - detach_helper2(this->e); -} - -template <typename T> -typename QLinkedList<T>::iterator QLinkedList<T>::detach_helper2(iterator orgite) -{ - // detach and convert orgite to an iterator in the detached instance - bool isEndIterator = (orgite.i == this->e); - union { QLinkedListData *d; Node *e; } x; - x.d = new QLinkedListData; - x.d->ref.initializeOwned(); - x.d->size = d->size; - x.d->sharable = true; - Node *original = e->n; - Node *copy = x.e; - Node *org = orgite.i; - - while (original != org) { - QT_TRY { - copy->n = new Node(original->t); - copy->n->p = copy; - original = original->n; - copy = copy->n; - } QT_CATCH(...) { - copy->n = x.e; - Q_ASSERT(!x.d->ref.deref()); // Don't trigger assert in free - freeData(x.d); - QT_RETHROW; - } - } - iterator r(copy); - while (original != e) { - QT_TRY { - copy->n = new Node(original->t); - copy->n->p = copy; - original = original->n; - copy = copy->n; - } QT_CATCH(...) { - copy->n = x.e; - Q_ASSERT(!x.d->ref.deref()); // Don't trigger assert in free - freeData(x.d); - QT_RETHROW; - } - } - copy->n = x.e; - x.e->p = copy; - if (!d->ref.deref()) - freeData(d); - d = x.d; - if (!isEndIterator) - ++r; // since we stored the element right before the original node. - return r; -} - -template <typename T> -void QLinkedList<T>::freeData(QLinkedListData *x) -{ - Node *y = reinterpret_cast<Node*>(x); - Node *i = y->n; - Q_ASSERT(x->ref.atomic.loadRelaxed() == 0); - while (i != y) { - Node *n = i; - i = i->n; - delete n; - } - delete x; -} - -template <typename T> -void QLinkedList<T>::clear() -{ - *this = QLinkedList<T>(); -} - -template <typename T> -QLinkedList<T> &QLinkedList<T>::operator=(const QLinkedList<T> &l) -{ - if (d != l.d) { - QLinkedListData *o = l.d; - o->ref.ref(); - if (!d->ref.deref()) - freeData(d); - d = o; - if (!d->sharable) - detach_helper(); - } - return *this; -} - -template <typename T> -bool QLinkedList<T>::operator== (const QLinkedList<T> &l) const -{ - if (d->size != l.d->size) - return false; - if (e == l.e) - return true; - Node *i = e->n; - Node *il = l.e->n; - while (i != e) { - if (! (i->t == il->t)) - return false; - i = i->n; - il = il->n; - } - return true; -} - -template <typename T> -void QLinkedList<T>::append(const T &t) -{ - detach(); - Node *i = new Node(t); - i->n = e; - i->p = e->p; - i->p->n = i; - e->p = i; - d->size++; -} - -template <typename T> -void QLinkedList<T>::prepend(const T &t) -{ - detach(); - Node *i = new Node(t); - i->n = e->n; - i->p = e; - i->n->p = i; - e->n = i; - d->size++; -} - -template <typename T> -int QLinkedList<T>::removeAll(const T &_t) -{ - detach(); - const T t = _t; - Node *i = e->n; - int c = 0; - while (i != e) { - if (i->t == t) { - Node *n = i; - i->n->p = i->p; - i->p->n = i->n; - i = i->n; - delete n; - c++; - } else { - i = i->n; - } - } - d->size-=c; - return c; -} - -template <typename T> -bool QLinkedList<T>::removeOne(const T &_t) -{ - detach(); - iterator it = std::find(begin(), end(), _t); - if (it != end()) { - erase(it); - return true; - } - return false; -} - -template <typename T> -inline T QLinkedList<T>::takeFirst() -{ - T t = std::move(first()); - removeFirst(); - return t; -} - -template <typename T> -inline T QLinkedList<T>::takeLast() -{ - T t = std::move(last()); - removeLast(); - return t; -} - -template <typename T> -bool QLinkedList<T>::contains(const T &t) const -{ - Node *i = e; - while ((i = i->n) != e) - if (i->t == t) - return true; - return false; -} - -template <typename T> -int QLinkedList<T>::count(const T &t) const -{ - Node *i = e; - int c = 0; - while ((i = i->n) != e) - if (i->t == t) - c++; - return c; -} - - -template <typename T> -typename QLinkedList<T>::iterator QLinkedList<T>::insert(iterator before, const T &t) -{ - if (d->ref.isShared()) - before = detach_helper2(before); - - Node *i = before.i; - Node *m = new Node(t); - m->n = i; - m->p = i->p; - m->p->n = m; - i->p = m; - d->size++; - return m; -} - -template <typename T> -typename QLinkedList<T>::iterator QLinkedList<T>::erase(typename QLinkedList<T>::iterator afirst, - typename QLinkedList<T>::iterator alast) -{ - while (afirst != alast) - erase(afirst++); - return alast; -} - - -template <typename T> -typename QLinkedList<T>::iterator QLinkedList<T>::erase(iterator pos) -{ - if (d->ref.isShared()) - pos = detach_helper2(pos); - - Node *i = pos.i; - if (i != e) { - Node *n = i; - i->n->p = i->p; - i->p->n = i->n; - i = i->n; - delete n; - d->size--; - } - return i; -} - -template <typename T> -QLinkedList<T> &QLinkedList<T>::operator+=(const QLinkedList<T> &l) -{ - detach(); - int n = l.d->size; - d->size += n; - Node *original = l.e->n; - while (n--) { - QT_TRY { - Node *copy = new Node(original->t); - original = original->n; - copy->n = e; - copy->p = e->p; - copy->p->n = copy; - e->p = copy; - } QT_CATCH(...) { - // restore the original list - while (n++<d->size) - removeLast(); - QT_RETHROW; - } - } - return *this; -} - -template <typename T> -QLinkedList<T> QLinkedList<T>::operator+(const QLinkedList<T> &l) const -{ - QLinkedList<T> n = *this; - n += l; - return n; -} - -Q_DECLARE_SEQUENTIAL_ITERATOR(LinkedList) -Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(LinkedList) - -#ifndef QT_NO_DATASTREAM -template <typename T> -inline QDataStream &operator>>(QDataStream &s, QLinkedList<T> &l) -{ - return QtPrivate::readListBasedContainer(s, l); -} - -template <typename T> -inline QDataStream &operator<<(QDataStream &s, const QLinkedList<T> &l) -{ - return QtPrivate::writeSequentialContainer(s, l); -} -#endif - -QT_END_NAMESPACE - -Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(QLinkedList) - -QT_WARNING_POP - -#endif // QT_DEPRECATED_SINCE(5, 15) - -#endif // QT_NO_LINKED_LIST - -#endif // QLINKEDLIST_H diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc index e5ba47b8ef..a0e9abe0ae 100644 --- a/src/corelib/tools/qvarlengtharray.qdoc +++ b/src/corelib/tools/qvarlengtharray.qdoc @@ -87,7 +87,7 @@ places inside Qt and was added to Qt's public API for the convenience of advanced users. - \sa QVector, QList, QLinkedList + \sa QVector, QList */ /*! \fn template<class T, int Prealloc> QVarLengthArray<T, Prealloc>::QVarLengthArray(int size) @@ -537,8 +537,7 @@ For large arrays, this operation can be slow (\l{linear time}), because it requires moving all the items in the vector by one position further in memory. If you want a container class that - provides a fast prepend() function, use QList or QLinkedList - instead. + provides a fast prepend() function, use std::list instead. \sa append(), insert() */ @@ -718,7 +717,7 @@ For large arrays, this operation can be slow (\l{linear time}), because it requires moving all the items at indexes \a i and above by one position further in memory. If you want a container - class that provides a fast insert() function, use QLinkedList + class that provides a fast insert() function, use std::list instead. \sa remove() diff --git a/src/corelib/tools/qvector.qdoc b/src/corelib/tools/qvector.qdoc index a5ea4073f8..daa6ff95e9 100644 --- a/src/corelib/tools/qvector.qdoc +++ b/src/corelib/tools/qvector.qdoc @@ -39,7 +39,7 @@ stores its items in adjacent memory locations and provides fast index-based access. - QList\<T\>, QLinkedList\<T\>, QVector\<T\>, and QVarLengthArray\<T\> + QList\<T\>, QVector\<T\>, and QVarLengthArray\<T\> provide similar APIs and functionality. They are often interchangeable, but there are performance consequences. Here is an overview of use cases: @@ -57,18 +57,13 @@ those APIs. \li If you need a real linked list, which guarantees \l{Algorithmic Complexity}{constant time} insertions mid-list and - uses iterators to items rather than indexes, use QLinkedList. + uses iterators to items rather than indexes, use std::list. \endlist \note QVector and QVarLengthArray both guarantee C-compatible array layout. QList does not. This might be important if your application must interface with a C API. - \note Iterators into a QLinkedList and references into - heap-allocating QLists remain valid as long as the referenced items - remain in the container. This is not true for iterators and - references into a QVector and non-heap-allocating QLists. - Here's an example of a QVector that stores integers and a QVector that stores QString values: @@ -129,7 +124,7 @@ (\l{linear time}) for large vectors, because they require moving many items in the vector by one position in memory. If you want a container class that provides fast insertion/removal in the middle, use - QList or QLinkedList instead. + std::list instead. Unlike plain C++ arrays, QVectors can be resized at any time by calling resize(). If the new size is larger than the old size, @@ -190,8 +185,6 @@ holding a lot of allocated memory, especially large, contiguous blocks. Such considerations, the configuration of such behavior or any mitigation are outside the scope of the Qt API. - - \sa QVectorIterator, QMutableVectorIterator, QList, QLinkedList */ /*! @@ -640,7 +633,7 @@ For large vectors, this operation can be slow (\l{linear time}), because it requires moving all the items in the vector by one position further in memory. If you want a container class that - provides a fast prepend() function, use QList or QLinkedList + provides a fast prepend operation, use std::list instead. \sa append(), insert() @@ -681,7 +674,7 @@ For large vectors, this operation can be slow (\l{linear time}), because it requires moving all the items at indexes \a i and above by one position further in memory. If you want a container - class that provides a fast insert() function, use QLinkedList + class that provides a fast insert() function, use std::list instead. \sa append(), prepend(), remove() diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index ff300bcf7b..edf4248c44 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -19,7 +19,6 @@ HEADERS += \ tools/qhashfunctions.h \ tools/qiterator.h \ tools/qline.h \ - tools/qlinkedlist.h \ tools/qlist.h \ tools/qmakearray_p.h \ tools/qmap.h \ @@ -56,7 +55,6 @@ SOURCES += \ tools/qfreelist.cpp \ tools/qhash.cpp \ tools/qline.cpp \ - tools/qlinkedlist.cpp \ tools/qlist.cpp \ tools/qpoint.cpp \ tools/qmap.cpp \ |