Fix QDoc warnings for QList/QVector
Task-number: QTBUG-86553 Change-Id: Iac944c78640bfcfb6ee137c0ef3dd89387700b4c Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
parent
8ba59441fc
commit
bf73495a66
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** 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.
|
||||
@ -60,11 +60,12 @@ template <class T> class QSet;
|
||||
template <class T> class QStack;
|
||||
template<class T, qsizetype Prealloc = 256> class QVarLengthArray;
|
||||
template <class T> class QList;
|
||||
template<typename T> using QVector = QList<T>;
|
||||
#ifndef Q_CLANG_QDOC
|
||||
template<typename T> using QVector = QList<T>;
|
||||
using QStringList = QList<QString>;
|
||||
using QByteArrayList = QList<QByteArray>;
|
||||
#else
|
||||
template<typename T> class QVector;
|
||||
class QStringList;
|
||||
class QByteArrayList;
|
||||
#endif
|
||||
|
@ -74,6 +74,10 @@ public:
|
||||
template <> struct QListSpecialMethods<QByteArray>;
|
||||
template <> struct QListSpecialMethods<QString>;
|
||||
|
||||
#ifdef Q_QDOC // define QVector for QDoc
|
||||
template<typename T> class QVector : public QList<T> {};
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
class QList
|
||||
#ifndef Q_QDOC
|
||||
@ -173,6 +177,12 @@ public:
|
||||
|
||||
// compiler-generated special member functions are fine!
|
||||
|
||||
#ifdef Q_QDOC
|
||||
// extra missing ones:
|
||||
bool operator==(const QList<T> &other) const;
|
||||
bool operator!=(const QList<T> &other) const;
|
||||
#endif
|
||||
|
||||
void swap(QList<T> &other) noexcept { qSwap(d, other.d); }
|
||||
|
||||
template <typename U>
|
||||
|
@ -637,7 +637,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename T> void QList<T>::append(const T &value)
|
||||
\fn template <typename T> void QList<T>::append(const_reference value)
|
||||
|
||||
Inserts \a value at the end of the list.
|
||||
|
||||
@ -655,7 +655,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename T> void QList<T>::append(T &&value)
|
||||
\fn template <typename T> void QList<T>::append(rvalue_ref value)
|
||||
\since 5.6
|
||||
|
||||
\overload
|
||||
@ -687,7 +687,7 @@
|
||||
|
||||
/*!
|
||||
\fn template <typename T> void QList<T>::prepend(const T &value)
|
||||
\fn template <typename T> void QList<T>::prepend(T &&value)
|
||||
\fn template <typename T> void QList<T>::prepend(rvalue_ref value)
|
||||
|
||||
Inserts \a value at the beginning of the list.
|
||||
|
||||
@ -727,8 +727,8 @@
|
||||
\sa emplace
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> void QList<T>::insert(qsizetype i, const T &value)
|
||||
\fn template <typename T> void QList<T>::insert(qsizetype i, T &&value)
|
||||
/*! \fn template <typename T> void QList<T>::insert(qsizetype i, parameter_type value)
|
||||
\fn template <typename T> void QList<T>::insert(qsizetype i, rvalue_ref value)
|
||||
|
||||
Inserts \a value at index position \a i in the list. If \a i is
|
||||
0, the value is prepended to the list. If \a i is size(), the
|
||||
@ -746,7 +746,7 @@
|
||||
\sa append(), prepend(), remove()
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> void QList<T>::insert(qsizetype i, qsizetype count, const T &value)
|
||||
/*! \fn template <typename T> void QList<T>::insert(qsizetype i, qsizetype count, parameter_type value)
|
||||
|
||||
\overload
|
||||
|
||||
@ -757,9 +757,8 @@
|
||||
\snippet code/src_corelib_tools_qlist.cpp 10
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename T> QList<T>::iterator QList<T>::insert(iterator before, const T &value)
|
||||
\fn template <typename T> QList<T>::iterator QList<T>::insert(iterator before, T &&value)
|
||||
/*! \fn template <typename T> QList<T>::iterator QList<T>::insert(const_iterator before, parameter_type value)
|
||||
\fn template <typename T> QList<T>::iterator QList<T>::insert(const_iterator before, rvalue_ref value)
|
||||
|
||||
\overload
|
||||
|
||||
@ -767,7 +766,7 @@
|
||||
\a before. Returns an iterator pointing at the inserted item.
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> QList<T>::iterator QList<T>::insert(iterator before, qsizetype count, const T &value)
|
||||
/*! \fn template <typename T> QList<T>::iterator QList<T>::insert(const_iterator before, qsizetype count, parameter_type value)
|
||||
|
||||
Inserts \a count copies of \a value in front of the item pointed to
|
||||
by the iterator \a before. Returns an iterator pointing at the
|
||||
@ -795,6 +794,7 @@
|
||||
|
||||
|
||||
/*! \fn template <typename T> void QList<T>::replace(qsizetype i, const T &value)
|
||||
\fn template <typename T> void QList<T>::replace(qsizetype i, rvalue_ref value)
|
||||
|
||||
Replaces the item at index position \a i with \a value.
|
||||
|
||||
@ -929,7 +929,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename T> template <typename ...Args> QList<T>::iterator QList<T>::emplace(QList<T>::iterator before, Args&&... args)
|
||||
\fn template <typename T> template <typename ...Args> QList<T>::iterator QList<T>::emplace(const_iterator before, Args&&... args)
|
||||
|
||||
\overload
|
||||
|
||||
@ -940,7 +940,7 @@
|
||||
Returns an iterator to the new element.
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> QList<T> &QList<T>::fill(const T &value, qsizetype size = -1)
|
||||
/*! \fn template <typename T> QList<T> &QList<T>::fill(parameter_type value, qsizetype size = -1)
|
||||
|
||||
Assigns \a value to all items in the list. If \a size is
|
||||
different from -1 (the default), the list is resized to size \a
|
||||
@ -1249,14 +1249,14 @@
|
||||
to append(\a value).
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> void QList<T>::push_back(T &&value)
|
||||
/*! \fn template <typename T> void QList<T>::push_back(rvalue_ref value)
|
||||
\since 5.6
|
||||
\overload
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename T> void QList<T>::push_front(const T &value)
|
||||
\fn template <typename T> void QList<T>::push_front(T &&value)
|
||||
\fn template <typename T> void QList<T>::push_front(rvalue_ref value)
|
||||
|
||||
This function is provided for STL compatibility. It is equivalent
|
||||
to prepend(\a value).
|
||||
@ -1335,7 +1335,7 @@
|
||||
\sa append(), operator<<()
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> void QList<T>::operator+=(T &&value)
|
||||
/*! \fn template <typename T> void QList<T>::operator+=(rvalue_ref value)
|
||||
\since 5.11
|
||||
|
||||
\overload
|
||||
@ -1366,7 +1366,7 @@
|
||||
\sa append(), operator+=()
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> QList<T> &QList<T>::operator<<(T &&value)
|
||||
/*! \fn template <typename T> QList<T> &QList<T>::operator<<(rvalue_ref value)
|
||||
\since 5.11
|
||||
|
||||
\overload
|
||||
@ -1466,7 +1466,7 @@
|
||||
|
||||
/*! \typedef QList::const_reference
|
||||
|
||||
Typedef for T &. Provided for STL compatibility.
|
||||
Typedef for const T &. Provided for STL compatibility.
|
||||
*/
|
||||
|
||||
/*! \typedef QList::difference_type
|
||||
@ -1494,6 +1494,16 @@
|
||||
Typedef for T. Provided for STL compatibility.
|
||||
*/
|
||||
|
||||
/*! \typedef QList::parameter_type
|
||||
|
||||
Trait-dependent typedef for either const T & or T.
|
||||
*/
|
||||
|
||||
/*! \typedef QList::rvalue_ref
|
||||
|
||||
Trait-dependent typedef for T &&.
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> QList<T> QList<T>::toList() const
|
||||
\fn template <typename T> QList<T> QList<T>::toVector() const
|
||||
\obsolete
|
||||
|
Loading…
Reference in New Issue
Block a user