summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcontiguouscache.h
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2021-10-08 18:06:49 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2021-10-18 13:42:07 +0200
commit8a8bf1b84e9a096993b892873eb62c735149f320 (patch)
tree3993d9c3998d3471197b747eca7f50d1c45e1ea9 /src/corelib/tools/qcontiguouscache.h
parent2f2fdc418d88dbb2b7e8dbf574d51286354067a7 (diff)
Fix docs for comparison/debug/data stream operators of Qt containers
Because of the constraints on comparison, debug and data stream operators, the return types for them look weird in docs. Conditionally use the actual return types, in case if Q_CLANG_QDOC is defined. Also add the docs of debug stream operators for types for which they were misssing. Task-number: QTBUG-97247 Pick-to: 6.2 Change-Id: I57f2c52bd3af805c7eeebb602c47de1e95ee09bd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools/qcontiguouscache.h')
-rw-r--r--src/corelib/tools/qcontiguouscache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index f0f5ac5dcb..62ebfa0658 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -99,6 +99,7 @@ public:
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QContiguousCache)
inline void swap(QContiguousCache<T> &other) noexcept { qSwap(d, other.d); }
+#ifndef Q_CLANG_QDOC
template <typename U = T>
QTypeTraits::compare_eq_result<U> operator==(const QContiguousCache<T> &other) const
{
@@ -117,6 +118,10 @@ public:
template <typename U = T>
QTypeTraits::compare_eq_result<U> operator!=(const QContiguousCache<T> &other) const
{ return !(*this == other); }
+#else
+ bool operator==(const QContiguousCache &other) const;
+ bool operator!=(const QContiguousCache &other) const;
+#endif // Q_CLANG_QDOC
inline qsizetype capacity() const {return d->alloc; }
inline qsizetype count() const { return d->count; }