diff options
author | Topi Reinio <topi.reinio@qt.io> | 2021-08-20 18:25:50 +0200 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2021-08-24 23:50:23 +0200 |
commit | 145940e1ef8fc8334ff4603a44f7896886e646cb (patch) | |
tree | dd44463eb0a62d3fdc38be2663da7b1a40453596 /src/corelib/tools | |
parent | d9f8b689637aa4559ee57dc80aef0d4325d14e0c (diff) |
Doc: Fix documentation issues for Qt Core
* Tag deprecated Q(Multi)Map operators in the header to correctly
match them with documentation \fn commands.
* Add documentation for QByteArrayView comparison operators.
* Add a dummy typedef 'jfieldID' for generating docs correctly
on non-Android platforms
* Fix other minor issues
Pick-to: 6.2
Task-number: QTBUG-95860
Change-Id: I141d2f75d6aa10557aa374201f09ad74b4cd6e81
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qmap.h | 16 | ||||
-rw-r--r-- | src/corelib/tools/qmap.qdoc | 38 | ||||
-rw-r--r-- | src/corelib/tools/qmultimap.qdoc | 36 | ||||
-rw-r--r-- | src/corelib/tools/qset.qdoc | 2 |
5 files changed, 56 insertions, 38 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index fe3d8d912e..62c84a0820 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -913,7 +913,7 @@ int qGlobalQHashSeed() If the environment variable \c QT_HASH_SEED is set, calling this function will result in a no-op. - \sa qHashSeed::globalSeed, QHashSeed + \sa QHashSeed::globalSeed(), QHashSeed */ void qSetGlobalQHashSeed(int newSeed) { diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h index cb3804308c..d5f6b91ba8 100644 --- a/src/corelib/tools/qmap.h +++ b/src/corelib/tools/qmap.h @@ -499,9 +499,11 @@ public: #if QT_DEPRECATED_SINCE(6, 0) QT_DEPRECATED_VERSION_X_6_0("Use std::next; QMap iterators are not random access") + //! [qmap-op-it-plus-step] friend iterator operator+(iterator it, difference_type j) { return std::next(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::prev; QMap iterators are not random access") + //! [qmap-op-it-minus-step] friend iterator operator-(iterator it, difference_type j) { return std::prev(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::next or std::advance; QMap iterators are not random access") @@ -511,9 +513,11 @@ public: iterator &operator-=(difference_type j) { std::advance(*this, -j); return *this; } QT_DEPRECATED_VERSION_X_6_0("Use std::next; QMap iterators are not random access") + //! [qmap-op-step-plus-it] friend iterator operator+(difference_type j, iterator it) { return std::next(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::prev; QMap iterators are not random access") + //! [qmap-op-step-minus-it] friend iterator operator-(difference_type j, iterator it) { return std::prev(it, j); } #endif }; @@ -566,9 +570,11 @@ public: #if QT_DEPRECATED_SINCE(6, 0) QT_DEPRECATED_VERSION_X_6_0("Use std::next; QMap iterators are not random access") + //! [qmap-op-it-plus-step-const] friend const_iterator operator+(const_iterator it, difference_type j) { return std::next(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::prev; QMap iterators are not random access") + //! [qmap-op-it-minus-step-const] friend const_iterator operator-(const_iterator it, difference_type j) { return std::prev(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::next or std::advance; QMap iterators are not random access") @@ -578,9 +584,11 @@ public: const_iterator &operator-=(difference_type j) { std::advance(*this, -j); return *this; } QT_DEPRECATED_VERSION_X_6_0("Use std::next; QMap iterators are not random access") + //! [qmap-op-step-plus-it-const] friend const_iterator operator+(difference_type j, const_iterator it) { return std::next(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::prev; QMap iterators are not random access") + //! [qmap-op-step-minus-it-const] friend const_iterator operator-(difference_type j, const_iterator it) { return std::prev(it, j); } #endif }; @@ -1173,9 +1181,11 @@ public: #if QT_DEPRECATED_SINCE(6, 0) QT_DEPRECATED_VERSION_X_6_0("Use std::next; QMultiMap iterators are not random access") + //! [qmultimap-op-it-plus-step] friend iterator operator+(iterator it, difference_type j) { return std::next(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::prev; QMultiMap iterators are not random access") + //! [qmultimap-op-it-minus-step] friend iterator operator-(iterator it, difference_type j) { return std::prev(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::next or std::advance; QMultiMap iterators are not random access") @@ -1185,9 +1195,11 @@ public: iterator &operator-=(difference_type j) { std::advance(*this, -j); return *this; } QT_DEPRECATED_VERSION_X_6_0("Use std::next; QMultiMap iterators are not random access") + //! [qmultimap-op-step-plus-it] friend iterator operator+(difference_type j, iterator it) { return std::next(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::prev; QMultiMap iterators are not random access") + //! [qmultimap-op-step-minus-it] friend iterator operator-(difference_type j, iterator it) { return std::prev(it, j); } #endif }; @@ -1240,9 +1252,11 @@ public: #if QT_DEPRECATED_SINCE(6, 0) QT_DEPRECATED_VERSION_X_6_0("Use std::next; QMultiMap iterators are not random access") + //! [qmultimap-op-it-plus-step-const] friend const_iterator operator+(const_iterator it, difference_type j) { return std::next(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::prev; QMultiMap iterators are not random access") + //! [qmultimap-op-it-minus-step-const] friend const_iterator operator-(const_iterator it, difference_type j) { return std::prev(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::next or std::advance; QMultiMap iterators are not random access") @@ -1252,9 +1266,11 @@ public: const_iterator &operator-=(difference_type j) { std::advance(*this, -j); return *this; } QT_DEPRECATED_VERSION_X_6_0("Use std::next; QMultiMap iterators are not random access") + //! [qmultimap-op-step-plus-it-const] friend const_iterator operator+(difference_type j, const_iterator it) { return std::next(it, j); } QT_DEPRECATED_VERSION_X_6_0("Use std::prev; QMultiMap iterators are not random access") + //! [qmultimap-op-step-minus-it-const] friend const_iterator operator-(difference_type j, const_iterator it) { return std::prev(it, j); } #endif }; diff --git a/src/corelib/tools/qmap.qdoc b/src/corelib/tools/qmap.qdoc index 0a9956502f..ba9b048157 100644 --- a/src/corelib/tools/qmap.qdoc +++ b/src/corelib/tools/qmap.qdoc @@ -1063,18 +1063,17 @@ current item. */ -/*! \fn template <class Key, class T> QMap<Key, T>::iterator operator+(QMap<Key, T>::iterator, difference_type n) - \fn template <class Key, class T> QMap<Key, T>::iterator operator+(difference_type n, QMap<Key, T>::iterator) - \fn template <class Key, class T> QMap<Key, T>::iterator operator-(QMap<Key, T>::iterator, difference_type n) - \fn template <class Key, class T> QMap<Key, T>::iterator operator-(difference_type n, QMap<Key, T>::iterator) - \fn template <class Key, class T> QMap<Key, T>::iterator QMap<Key, T>::iterator::operator+=(difference_type n) - \fn template <class Key, class T> QMap<Key, T>::iterator QMap<Key, T>::iterator::operator-=(difference_type n) +/*! //! friends + \fn [qmap-op-it-plus-step] template <class Key, class T> typename QMap<Key, T>::iterator QMap<Key, T>::iterator::operator+(QMap<Key, T>::iterator, difference_type n) + \fn [qmap-op-step-plus-it] template <class Key, class T> QMap<Key, T>::iterator QMap<Key, T>::iterator::operator+(difference_type n, QMap<Key, T>::iterator) + \fn [qmap-op-it-minus-step] template <class Key, class T> QMap<Key, T>::iterator QMap<Key, T>::iterator::operator-(QMap<Key, T>::iterator, difference_type n) + \fn [qmap-op-step-minus-it] template <class Key, class T> QMap<Key, T>::iterator QMap<Key, T>::iterator::operator-(difference_type n, QMap<Key, T>::iterator) - \obsolete + //! members + \fn template <class Key, class T> typename QMap<Key, T>::iterator QMap<Key, T>::iterator::operator+=(QMap<Key, T>::iterator::difference_type n) + \fn template <class Key, class T> typename QMap<Key, T>::iterator QMap<Key, T>::iterator::operator-=(QMap<Key, T>::iterator::difference_type n) - \since 6.2 - - Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. + \deprecated [6.2] Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. Moves an iterator by \e{n} positions. These operations can be expensive for large values of \e{n}; QMap iterators are not @@ -1235,18 +1234,17 @@ current item. */ -/*! \fn template <class Key, class T> QMap<Key, T>::const_iterator operator+(QMap<Key, T>::const_iterator, difference_type n) - \fn template <class Key, class T> QMap<Key, T>::const_iterator operator+(difference_type n, QMap<Key, T>::const_iterator) - \fn template <class Key, class T> QMap<Key, T>::const_iterator operator-(QMap<Key, T>::const_iterator, difference_type n) - \fn template <class Key, class T> QMap<Key, T>::const_iterator operator-(difference_type n, QMap<Key, T>::const_iterator) - \fn template <class Key, class T> QMap<Key, T>::const_iterator QMap<Key, T>::const_iterator::operator+=(difference_type n) - \fn template <class Key, class T> QMap<Key, T>::const_iterator QMap<Key, T>::const_iterator::operator-=(difference_type n) - - \obsolete +/*! //! friends + \fn [qmap-op-it-plus-step-const] template <class Key, class T> QMap<Key, T>::const_iterator::operator+(QMap<Key, T>::const_iterator, difference_type n) + \fn [qmap-op-step-plus-it-const] template <class Key, class T> QMap<Key, T>::operator+(difference_type n, QMap<Key, T>::const_iterator) + \fn [qmap-op-it-minus-step-const] template <class Key, class T> QMap<Key, T>::operator-(QMap<Key, T>::const_iterator, difference_type n) + \fn [qmap-op-step-minus-it-const] template <class Key, class T> QMap<Key, T>::operator-(difference_type n, QMap<Key, T>::const_iterator) - \since 6.2 + //! members + \fn template <class Key, class T> typename QMap<Key, T>::const_iterator QMap<Key, T>::const_iterator::operator+=(QMap<Key, T>::const_iterator::difference_type n) + \fn template <class Key, class T> typename QMap<Key, T>::const_iterator QMap<Key, T>::const_iterator::operator-=(QMap<Key, T>::const_iterator::difference_type n) - Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. + \deprecated [6.2] Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. Moves an iterator by \e{n} positions. These operations can be expensive for large values of \e{n}. QMap iterators are not diff --git a/src/corelib/tools/qmultimap.qdoc b/src/corelib/tools/qmultimap.qdoc index bd17a03ba2..6bfc1515e6 100644 --- a/src/corelib/tools/qmultimap.qdoc +++ b/src/corelib/tools/qmultimap.qdoc @@ -1197,16 +1197,18 @@ current item. */ -/*! \fn template <class Key, class T> QMultiMap<Key, T>::iterator operator+(QMultiMap<Key, T>::iterator, difference_type n) - \fn template <class Key, class T> QMultiMap<Key, T>::iterator operator+(difference_type n, QMultiMap<Key, T>::iterator) - \fn template <class Key, class T> QMultiMap<Key, T>::iterator operator-(QMultiMap<Key, T>::iterator, difference_type n) - \fn template <class Key, class T> QMultiMap<Key, T>::iterator operator-(difference_type n, QMultiMap<Key, T>::iterator) - \fn template <class Key, class T> QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator+=(difference_type n) - \fn template <class Key, class T> QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator-=(difference_type n) +/*! + //! friends + \fn [qmultimap-op-it-plus-step] template <class Key, class T> typename QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator+(QMultiMap<Key, T>::iterator, difference_type n) + \fn [qmultimap-op-step-plus-it] template <class Key, class T> QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator+(difference_type n, QMultiMap<Key, T>::iterator) + \fn [qmultimap-op-it-minus-step] template <class Key, class T> QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator-(QMultiMap<Key, T>::iterator, difference_type n) + \fn [qmultimap-op-step-minus-it] template <class Key, class T> QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator-(difference_type n, QMultiMap<Key, T>::iterator) - \obsolete + //! members + \fn template <class Key, class T> typename QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator+=(QMultiMap<Key, T>::iterator::difference_type n) + \fn template <class Key, class T> typename QMultiMap<Key, T>::iterator QMultiMap<Key, T>::iterator::operator-=(QMultiMap<Key, T>::iterator::difference_type n) - Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. + \deprecated [6.2] Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. Move an iterator by \e{n} positions. These operations can be expensive for large values of \e{n}; QMultiMap iterators are not @@ -1369,16 +1371,18 @@ current item. */ -/*! \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator operator+(QMultiMap<Key, T>::const_iterator, difference_type n) - \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator operator+(difference_type n, QMultiMap<Key, T>::const_iterator) - \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator operator-(QMultiMap<Key, T>::const_iterator, difference_type n) - \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator operator-(difference_type n, QMultiMap<Key, T>::const_iterator) - \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator+=(difference_type n) - \fn template <class Key, class T> QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator-=(difference_type n) +/*! + //! friends + \fn [qmultimap-op-it-plus-step-const] template <class Key, class T> typename QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator+(QMultiMap<Key, T>::const_iterator, difference_type n) + \fn [qmultimap-op-step-plus-it-const] template <class Key, class T> QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator+(difference_type n, QMultiMap<Key, T>::const_iterator) + \fn [qmultimap-op-it-minus-step-const] template <class Key, class T> QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator-(QMultiMap<Key, T>::const_iterator, difference_type n) + \fn [qmultimap-op-step-minus-it-const] template <class Key, class T> QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator-(difference_type n, QMultiMap<Key, T>::const_iterator) - \obsolete + //! members + \fn template <class Key, class T> typename QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator+=(QMultiMap<Key, T>::const_iterator::difference_type n) + \fn template <class Key, class T> typename QMultiMap<Key, T>::const_iterator QMultiMap<Key, T>::const_iterator::operator-=(QMultiMap<Key, T>::const_iterator::difference_type n) - Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. + \deprecated [6.2] Use \c{std::next}, \c{std::prev} or \c{std::advance} instead. Move an iterator by \e{n} positions. These operations can be expensive for large values of \e{n}. QMultiMap iterators are not diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc index 4b830c9cb7..137aa61502 100644 --- a/src/corelib/tools/qset.qdoc +++ b/src/corelib/tools/qset.qdoc @@ -577,7 +577,7 @@ \overload - Same as \l {intersect()} {intersect(\a{other})}, if we consider \a other to be a set + Same as \l {intersect()} {intersect(\e{other})}, if we consider \e other to be a set that contains the singleton \a value. */ |