summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-23 15:20:42 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-23 15:20:42 (GMT)
commitd405aa6510514ce02b312994db55c305bde60285 (patch)
treef64ba2531bc2eb99149ffdc13a4c0776df8bab25 /doc
parent168ae6571dc93ee11fc0f61db643fb7679bb729f (diff)
parent42a9fe3042945937839eda3578655ca091422b28 (diff)
downloadQt-d405aa6510514ce02b312994db55c305bde60285.zip
Qt-d405aa6510514ce02b312994db55c305bde60285.tar.gz
Qt-d405aa6510514ce02b312994db55c305bde60285.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Doc: QtConcurrent::run. Make sure the example actually compiles
Diffstat (limited to 'doc')
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
index 8f74461..cea6553 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
@@ -73,16 +73,14 @@ QFuture<QString> future = QtConcurrent::run(someFunction, bytearray);
QString result = future.result();
//! [3]
-
//! [4]
-// call 'QStringList QString::split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const' in a separate thread
-QString string = ...;
-QFuture<QStringList> future = QtConcurrent::run(string, &QString::split, QString(", "), QString::KeepEmptyParts, Qt::CaseSensitive);
+// call 'QList<QByteArray> QByteArray::split(char sep) const' in a separate thread
+QByteArray bytearray = "hello world;
+QFuture<QList<QByteArray> > future = QtConcurrent::run(bytearray, &QByteArray::split), ',');
...
-QStringList result = future.result();
+QList<QByteArray> result = future.result();
//! [4]
-
//! [5]
// call 'void QImage::invertPixels(InvertMode mode)' in a separate thread
QImage image = ...;