summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentfilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/qtconcurrentfilter.cpp')
-rw-r--r--src/concurrent/qtconcurrentfilter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/concurrent/qtconcurrentfilter.cpp b/src/concurrent/qtconcurrentfilter.cpp
index 3e3ed7cf68..d4e4656127 100644
--- a/src/concurrent/qtconcurrentfilter.cpp
+++ b/src/concurrent/qtconcurrentfilter.cpp
@@ -142,12 +142,19 @@
\section2 Using Function Objects
QtConcurrent::filter(), QtConcurrent::filtered(), and
- QtConcurrent::filteredReduced() accept function objects, which can be used to
+ QtConcurrent::filteredReduced() accept function objects
+ for the filter function. These function objects can be used to
add state to a function call. The result_type typedef must define the
result type of the function call operator:
\snippet code/src_concurrent_qtconcurrentfilter.cpp 13
+ For the reduce function, function objects are not directly
+ supported. Function objects can, however, be used
+ when the type of the reduction result is explicitly specified:
+
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 14
+
\section2 Wrapping Functions that Take Multiple Arguments
If you want to use a filter function takes more than one argument, you can