summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-23 10:16:59 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-23 10:32:54 (GMT)
commit42a9fe3042945937839eda3578655ca091422b28 (patch)
tree469836c6a28b06c3c2724e5037098c015a4241ad /src/corelib/concurrent
parentfa11bd40388e437e4f29aab93f1c368d428e28e3 (diff)
downloadQt-42a9fe3042945937839eda3578655ca091422b28.zip
Qt-42a9fe3042945937839eda3578655ca091422b28.tar.gz
Qt-42a9fe3042945937839eda3578655ca091422b28.tar.bz2
Doc: QtConcurrent::run. Make sure the example actually compiles
QString::split has overload, and if you want to take the address of a function with overload, you need to cast it. If we really wanted to use QString::split, we would have to do QFuture<QStringList> future = QtConcurrent::run(string, static_cast<QStringList (QString::*)(const QString &, QString::SplitBehavior, Qt::CaseSensitivity ) const>(&QString::split), QString (", "), QString::KeepEmptyParts, Qt::CaseSensitive); So use QByteArray::split as an example instead Task-number: QTBUG-12897 Reviewed-by: David Boddie
Diffstat (limited to 'src/corelib/concurrent')
-rw-r--r--src/corelib/concurrent/qtconcurrentrun.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/concurrent/qtconcurrentrun.cpp b/src/corelib/concurrent/qtconcurrentrun.cpp
index 5a9c755..e80a204 100644
--- a/src/corelib/concurrent/qtconcurrentrun.cpp
+++ b/src/corelib/concurrent/qtconcurrentrun.cpp
@@ -99,7 +99,7 @@
functions; passing by pointer is useful for calling non-const member
functions that modify the instance.
- For example, calling QString::split() (a const member function) in a
+ 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