summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qiterable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qiterable.cpp')
-rw-r--r--src/corelib/kernel/qiterable.cpp67
1 files changed, 17 insertions, 50 deletions
diff --git a/src/corelib/kernel/qiterable.cpp b/src/corelib/kernel/qiterable.cpp
index cc3f441517..a8c93fbc1c 100644
--- a/src/corelib/kernel/qiterable.cpp
+++ b/src/corelib/kernel/qiterable.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 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$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include <QtCore/qiterable.h>
@@ -187,7 +151,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn template<class Container> QIterator<Container> &QIterator<Container>::operator++()
- The prefix ++ operator (\c{++it}) advances the iterator to the
+ The prefix \c{++} operator (\c{++it}) advances the iterator to the
next item in the container and returns an iterator to the new current
item.
@@ -200,7 +164,7 @@ QT_BEGIN_NAMESPACE
\fn template<class Container> QIterator<Container> QIterator<Container>::operator++(int)
\overload
- The postfix ++ operator (\c{it++}) advances the iterator to the
+ The postfix \c{++} operator (\c{it++}) advances the iterator to the
next item in the container and returns an iterator to the previously
current item.
*/
@@ -209,7 +173,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn template<class Container> QIterator<Container> &QIterator<Container>::operator--()
- The prefix -- operator (\c{--it}) makes the preceding item
+ The prefix \c{--} operator (\c{--it}) makes the preceding item
current and returns an iterator to the new current item.
Calling this function on QSequentialIterable::begin() leads to undefined results.
@@ -225,7 +189,7 @@ QT_BEGIN_NAMESPACE
\overload
- The postfix -- operator (\c{it--}) makes the preceding item
+ The postfix \c{--} operator (\c{it--}) makes the preceding item
current and returns an iterator to the previously current item.
If the container in the QVariant does not support bi-directional iteration, calling this function
@@ -276,6 +240,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn template<class Container> qsizetype QIterator<Container>::operator-(const QIterator<Container> &j) const
+ \overload
Returns the distance between the two iterators.
@@ -323,7 +288,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn template<class Container> QConstIterator<Container> &QConstIterator<Container>::operator++()
- The prefix ++ operator (\c{++it}) advances the iterator to the
+ The prefix \c{++} operator (\c{++it}) advances the iterator to the
next item in the container and returns an iterator to the new current
item.
@@ -337,7 +302,7 @@ QT_BEGIN_NAMESPACE
\overload
- The postfix ++ operator (\c{it++}) advances the iterator to the
+ The postfix \c{++} operator (\c{it++}) advances the iterator to the
next item in the container and returns an iterator to the previously
current item.
*/
@@ -345,7 +310,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn template<class Container> QConstIterator<Container> &QConstIterator<Container>::operator--()
- The prefix -- operator (\c{--it}) makes the preceding item
+ The prefix \c{--} operator (\c{--it}) makes the preceding item
current and returns an iterator to the new current item.
Calling this function on QIterable<Container>::begin() leads to undefined results.
@@ -361,7 +326,7 @@ QT_BEGIN_NAMESPACE
\overload
- The postfix -- operator (\c{it--}) makes the preceding item
+ The postfix \c{--} operator (\c{it--}) makes the preceding item
current and returns an iterator to the previously current item.
If the container in the QVariant does not support bi-directional iteration, calling this function
@@ -413,6 +378,8 @@ QT_BEGIN_NAMESPACE
/*!
\fn template <class Container> qsizetype QConstIterator<Container>::operator-(const QConstIterator<Container> &j) const
+ \overload
+
Returns the distance between the two iterators.
\sa operator+(), operator-=(), QIterable::canReverseIterate()
@@ -541,7 +508,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn template<class Iterator, typename IteratorCategory> QTaggedIterator<Iterator, IteratorCategory> &QTaggedIterator<Iterator, IteratorCategory>::operator++()
- The prefix ++ operator (\c{++it}) advances the iterator to the
+ The prefix \c{++} operator (\c{++it}) advances the iterator to the
next item in the container and returns an iterator to the new current
item.
@@ -554,7 +521,7 @@ QT_BEGIN_NAMESPACE
\fn template<class Iterator, typename IteratorCategory> QTaggedIterator<Iterator, IteratorCategory> QTaggedIterator<Iterator, IteratorCategory>::operator++(int)
\overload
- The postfix ++ operator (\c{it++}) advances the iterator to the
+ The postfix \c{++} operator (\c{it++}) advances the iterator to the
next item in the container and returns an iterator to the previously
current item.
*/
@@ -563,7 +530,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn template<class Iterator, typename IteratorCategory> QTaggedIterator<Iterator, IteratorCategory> &QTaggedIterator<Iterator, IteratorCategory>::operator--()
- The prefix -- operator (\c{--it}) makes the preceding item
+ The prefix \c{--} operator (\c{--it}) makes the preceding item
current and returns an iterator to the new current item.
Calling this function on QSequentialIterable::begin() leads to undefined results.
@@ -578,7 +545,7 @@ QT_BEGIN_NAMESPACE
\fn template<class Iterator, typename IteratorCategory> QTaggedIterator<Iterator, IteratorCategory> QTaggedIterator<Iterator, IteratorCategory>::operator--(int)
\overload
- The postfix -- operator (\c{it--}) makes the preceding item
+ The postfix \c{--} operator (\c{it--}) makes the preceding item
current and returns an iterator to the previously current item.
If the container in the QVariant does not support bi-directional iteration, calling this function