diff options
author | Casper van Donderen <casper.vandonderen@nokia.com> | 2012-05-07 11:33:42 +0200 |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2012-05-09 08:36:06 +0200 |
commit | 4548022ee27259b85a41a8df2ad28a99f1af7eed (patch) | |
tree | b74da582d3d1219984828a012be0efca12ff8235 /src/concurrent/qtconcurrentrun.cpp | |
parent | a409cebe3d780eaae46e9ce7b19faa949059ec8e (diff) |
Doc: Modularize QtConcurrent documentation.
This change moves the snippets and images to the modularized directories.
Change-Id: If52f69c0f8bb4d2df4ee46f5524a82047ec214de
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'src/concurrent/qtconcurrentrun.cpp')
-rw-r--r-- | src/concurrent/qtconcurrentrun.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/concurrent/qtconcurrentrun.cpp b/src/concurrent/qtconcurrentrun.cpp index 656ecf7370..2cf46ac5a1 100644 --- a/src/concurrent/qtconcurrentrun.cpp +++ b/src/concurrent/qtconcurrentrun.cpp @@ -57,7 +57,7 @@ To run a function in another thread, use QtConcurrent::run(): - \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 0 + \snippet code/src_concurrent_qtconcurrentrun.cpp 0 This will run \e aFunction in a separate thread obtained from the default QThreadPool. You can use the QFuture and QFutureWatcher classes to monitor @@ -68,7 +68,7 @@ Passing arguments to the function is done by adding them to the QtConcurrent::run() call immediately after the function name. For example: - \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 1 + \snippet code/src_concurrent_qtconcurrentrun.cpp 1 A copy of each argument is made at the point where QtConcurrent::run() is called, and these values are passed to the thread when it begins executing @@ -79,11 +79,11 @@ Any return value from the function is available via QFuture: - \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 2 + \snippet code/src_concurrent_qtconcurrentrun.cpp 2 As documented above, passing arguments is done like this: - \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 3 + \snippet code/src_concurrent_qtconcurrentrun.cpp 3 Note that the QFuture::result() function blocks and waits for the result to become available. Use QFutureWatcher to get notification when the @@ -102,11 +102,11 @@ For example, calling QByteArray::split() (a const member function) in a separate thread is done like this: - \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 4 + \snippet code/src_concurrent_qtconcurrentrun.cpp 4 Calling a non-const member function is done like this: - \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 5 + \snippet code/src_concurrent_qtconcurrentrun.cpp 5 \section2 Using Bound Function Arguments @@ -131,7 +131,7 @@ Calling a bound function is done like this: - \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 6 + \snippet code/src_concurrent_qtconcurrentrun.cpp 6 */ /*! |