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/qtconcurrentfilter.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/qtconcurrentfilter.h')
-rw-r--r-- | src/concurrent/qtconcurrentfilter.h | 59 |
1 files changed, 9 insertions, 50 deletions
diff --git a/src/concurrent/qtconcurrentfilter.h b/src/concurrent/qtconcurrentfilter.h index 5f4148091e..acc794fad8 100644 --- a/src/concurrent/qtconcurrentfilter.h +++ b/src/concurrent/qtconcurrentfilter.h @@ -42,60 +42,13 @@ #include <QtConcurrent/qtconcurrent_global.h> -#ifndef QT_NO_CONCURRENT +#if !defined(QT_NO_CONCURRENT) || defined(Q_CLANG_QDOC) #include <QtConcurrent/qtconcurrentfilterkernel.h> #include <QtConcurrent/qtconcurrentfunctionwrappers.h> QT_BEGIN_NAMESPACE - -#ifdef Q_QDOC - -namespace QtConcurrent { - - QFuture<void> filter(Sequence &sequence, FilterFunction filterFunction); - - template <typename T> - QFuture<T> filtered(const Sequence &sequence, FilterFunction filterFunction); - template <typename T> - QFuture<T> filtered(ConstIterator begin, ConstIterator end, FilterFunction filterFunction); - - template <typename T> - QFuture<T> filteredReduced(const Sequence &sequence, - FilterFunction filterFunction, - ReduceFunction reduceFunction, - QtConcurrent::ReduceOptions reduceOptions = UnorderedReduce | SequentialReduce); - template <typename T> - QFuture<T> filteredReduced(ConstIterator begin, - ConstIterator end, - FilterFunction filterFunction, - ReduceFunction reduceFunction, - QtConcurrent::ReduceOptions reduceOptions = UnorderedReduce | SequentialReduce); - - void blockingFilter(Sequence &sequence, FilterFunction filterFunction); - - template <typename Sequence> - Sequence blockingFiltered(const Sequence &sequence, FilterFunction filterFunction); - template <typename Sequence> - Sequence blockingFiltered(ConstIterator begin, ConstIterator end, FilterFunction filterFunction); - - template <typename T> - T blockingFilteredReduced(const Sequence &sequence, - FilterFunction filterFunction, - ReduceFunction reduceFunction, - QtConcurrent::ReduceOptions reduceOptions = UnorderedReduce | SequentialReduce); - template <typename T> - T blockingFilteredReduced(ConstIterator begin, - ConstIterator end, - FilterFunction filterFunction, - ReduceFunction reduceFunction, - QtConcurrent::ReduceOptions reduceOptions = UnorderedReduce | SequentialReduce); - -} // namespace QtConcurrent - -#else - namespace QtConcurrent { //! [QtConcurrent-1] @@ -123,6 +76,7 @@ QFuture<ResultType> filteredReduced(const Sequence &sequence, return startFilteredReduced<ResultType>(sequence, QtPrivate::createFunctionWrapper(keep), QtPrivate::createFunctionWrapper(reduce), options); } +#ifndef Q_CLANG_QDOC template <typename Sequence, typename KeepFunctor, typename ReduceFunctor> QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> filteredReduced(const Sequence &sequence, KeepFunctor keep, @@ -135,6 +89,7 @@ QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> filtere QtPrivate::createFunctionWrapper(reduce), options); } +#endif // filteredReduced() on iterators template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor> @@ -147,6 +102,7 @@ QFuture<ResultType> filteredReduced(Iterator begin, return startFilteredReduced<ResultType>(begin, end, QtPrivate::createFunctionWrapper(keep), QtPrivate::createFunctionWrapper(reduce), options); } +#ifndef Q_CLANG_QDOC template <typename Iterator, typename KeepFunctor, typename ReduceFunctor> QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> filteredReduced(Iterator begin, Iterator end, @@ -160,6 +116,7 @@ QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> filtere QtPrivate::createFunctionWrapper(reduce), options); } +#endif // filtered() on sequences template <typename Sequence, typename KeepFunctor> @@ -193,6 +150,7 @@ ResultType blockingFilteredReduced(const Sequence &sequence, .startBlocking(); } +#ifndef Q_CLANG_QDOC template <typename Sequence, typename KeepFunctor, typename ReduceFunctor> typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType blockingFilteredReduced(const Sequence &sequence, KeepFunctor keep, @@ -205,6 +163,7 @@ typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType blockingFiltered QtPrivate::createFunctionWrapper(reduce), options); } +#endif // blocking filteredReduced() on iterators template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor> @@ -222,6 +181,7 @@ ResultType blockingFilteredReduced(Iterator begin, .startBlocking(); } +#ifndef Q_CLANG_QDOC template <typename Iterator, typename KeepFunctor, typename ReduceFunctor> typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType blockingFilteredReduced(Iterator begin, Iterator end, @@ -236,6 +196,7 @@ typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType blockingFiltered options) .startBlocking(); } +#endif // blocking filtered() on sequences template <typename Sequence, typename KeepFunctor> @@ -256,8 +217,6 @@ OutputSequence blockingFiltered(Iterator begin, Iterator end, KeepFunctor keep) } // namespace QtConcurrent -#endif // Q_QDOC - QT_END_NAMESPACE #endif // QT_NO_CONCURRENT |