Fix the doc example
The intention is to return list containing two items, not just one. Change-Id: I96f3ce939f2ef6db6bdac5d9165bb7814ebfa91a Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This commit is contained in:
parent
9260950552
commit
7773f7f90e
@ -93,7 +93,7 @@ QString result = future.result();
|
||||
//! [4]
|
||||
// call 'QList<QByteArray> QByteArray::split(char sep) const' in a separate thread
|
||||
QByteArray bytearray = "hello world";
|
||||
QFuture<QList<QByteArray> > future = QtConcurrent::run(&QByteArray::split, bytearray, ',');
|
||||
QFuture<QList<QByteArray> > future = QtConcurrent::run(&QByteArray::split, bytearray, ' ');
|
||||
...
|
||||
QList<QByteArray> result = future.result();
|
||||
//! [4]
|
||||
|
Loading…
x
Reference in New Issue
Block a user