From a6930724f0d12fbe9befd10f92a604d4a41e5c7a Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Tue, 29 Sep 2020 13:07:46 +0200 Subject: [PATCH] Improve docs for QtConcurrent::{filter, blockingFilter} Change-Id: Ibe3a038ad6853da1a6c9246b1157cd7ada4b9f32 Reviewed-by: Jarek Kobus Reviewed-by: Paul Wicking --- src/concurrent/qtconcurrentfilter.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/concurrent/qtconcurrentfilter.cpp b/src/concurrent/qtconcurrentfilter.cpp index 9f4d962518..ce484dcef9 100644 --- a/src/concurrent/qtconcurrentfilter.cpp +++ b/src/concurrent/qtconcurrentfilter.cpp @@ -243,6 +243,9 @@ If \a filterFunction returns \c true, the item is kept in \a sequence; otherwise, the item is removed from \a sequence. + Note that this method doesn't have an overload working with iterators, because + it invalidates the iterators of the sequence it operates on. + \sa {Concurrent Filter and Filter-Reduce} */ @@ -253,6 +256,9 @@ \a filterFunction returns \c true, the item is kept in \a sequence; otherwise, the item is removed from \a sequence. + Note that this method doesn't have an overload working with iterators, because + it invalidates the iterators of the sequence it operates on. + \sa {Concurrent Filter and Filter-Reduce} */ @@ -470,21 +476,27 @@ If \a filterFunction returns \c true, the item is kept in \a sequence; otherwise, the item is removed from \a sequence. + Note that this method doesn't have an overload working with iterators, because + it invalidates the iterators of the sequence it operates on. + \note This function will block until all items in the sequence have been processed. \sa {Concurrent Filter and Filter-Reduce} */ /*! - \fn template void QtConcurrent::blockingFilter(Sequence &sequence, KeepFunctor filterFunction) + \fn template void QtConcurrent::blockingFilter(Sequence &sequence, KeepFunctor filterFunction) - Calls \a filterFunction once for each item in \a sequence. If - \a filterFunction returns \c true, the item is kept in \a sequence; - otherwise, the item is removed from \a sequence. + Calls \a filterFunction once for each item in \a sequence. If + \a filterFunction returns \c true, the item is kept in \a sequence; + otherwise, the item is removed from \a sequence. - \note This function will block until all items in the sequence have been processed. + Note that this method doesn't have an overload working with iterators, because + it invalidates the iterators of the sequence it operates on. - \sa {Concurrent Filter and Filter-Reduce} + \note This function will block until all items in the sequence have been processed. + + \sa {Concurrent Filter and Filter-Reduce} */ /*!