diff options
author | Martin Smith <martin.smith@qt.io> | 2017-01-13 12:12:06 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2017-12-08 14:06:02 +0000 |
commit | 4f9575ecbcfd40252b9ad28092e815efe9e824da (patch) | |
tree | 1dfc37603d2dc0019d29ad48e0d417032ade1b59 /src/concurrent/qtconcurrentreducekernel.h | |
parent | d3af09fdb20eef52a85dfedf71517863242a63a0 (diff) |
doc: Fix all qdoc errors in QtConcurrent
These errors resulted from the improved parsing provided
by clang, which required rethinking which elements of the
QtConcurrent API should be visible to clangqdoc. The basic
problem is that clang must see declarations for all types
used by a type, or else it either gets lost and fails to
parse a type correctly, or it simply refuses to include
the type in its AST.
Change-Id: Iaa699c287e67d1288fcb2d83a9dbbaf07521d0cc
Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/concurrent/qtconcurrentreducekernel.h')
-rw-r--r-- | src/concurrent/qtconcurrentreducekernel.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/concurrent/qtconcurrentreducekernel.h b/src/concurrent/qtconcurrentreducekernel.h index c5003a2a0e..d1a283eb53 100644 --- a/src/concurrent/qtconcurrentreducekernel.h +++ b/src/concurrent/qtconcurrentreducekernel.h @@ -42,7 +42,7 @@ #include <QtConcurrent/qtconcurrent_global.h> -#ifndef QT_NO_CONCURRENT +#if !defined(QT_NO_CONCURRENT) || defined(Q_CLANG_QDOC) #include <QtCore/qatomic.h> #include <QtCore/qlist.h> @@ -57,8 +57,6 @@ QT_BEGIN_NAMESPACE namespace QtConcurrent { -#ifndef Q_QDOC - /* The ReduceQueueStartLimit and ReduceQueueThrottleLimit constants limit the reduce queue size for MapReduce. When the number of @@ -66,10 +64,17 @@ namespace QtConcurrent { MapReduce won't start any new threads, and when it exceeds ReduceQueueThrottleLimit running threads will be stopped. */ +#ifdef Q_CLANG_QDOC +enum ReduceQueueLimits { + ReduceQueueStartLimit = 20, + ReduceQueueThrottleLimit = 30 +}; +#else enum { ReduceQueueStartLimit = 20, ReduceQueueThrottleLimit = 30 }; +#endif // IntermediateResults holds a block of intermediate results from a // map or filter functor. The begin/end offsets indicates the origin @@ -82,8 +87,6 @@ public: QVector<T> vector; }; -#endif // Q_QDOC - enum ReduceOption { UnorderedReduce = 0x1, OrderedReduce = 0x2, @@ -91,10 +94,9 @@ enum ReduceOption { // ParallelReduce = 0x8 }; Q_DECLARE_FLAGS(ReduceOptions, ReduceOption) +#ifndef Q_CLANG_QDOC Q_DECLARE_OPERATORS_FOR_FLAGS(ReduceOptions) - -#ifndef Q_QDOC - +#endif // supports both ordered and out-of-order reduction template <typename ReduceFunctor, typename ReduceResultType, typename T> class ReduceKernel @@ -239,8 +241,6 @@ struct SequenceHolder2 : public Base } }; -#endif //Q_QDOC - } // namespace QtConcurrent QT_END_NAMESPACE |