Use QList instead of QVector in QtConcurrent
Task-number: QTBUG-84469 Change-Id: I99e41c1fef5459d7358b20a97a1dbefcd43bb4e5 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This commit is contained in:
parent
c068b80727
commit
4a12757e5d
@ -44,7 +44,7 @@
|
||||
|
||||
The QtConcurrent::filter(), QtConcurrent::filtered() and
|
||||
QtConcurrent::filteredReduced() functions filter items in a sequence such
|
||||
as a QList or a QVector in parallel. QtConcurrent::filter() modifies a
|
||||
as a QList in parallel. QtConcurrent::filter() modifies a
|
||||
sequence in-place, QtConcurrent::filtered() returns a new sequence
|
||||
containing the filtered content, and QtConcurrent::filteredReduced()
|
||||
returns a single result.
|
||||
|
@ -124,7 +124,7 @@ public:
|
||||
|
||||
int currentResultCount;
|
||||
ThreadEngine<T> *threadEngine;
|
||||
QVector<T> vector;
|
||||
QList<T> vector;
|
||||
};
|
||||
|
||||
template <>
|
||||
|
@ -148,7 +148,7 @@
|
||||
|
||||
The QtConcurrent::map(), QtConcurrent::mapped() and
|
||||
QtConcurrent::mappedReduced() functions run computations in parallel on
|
||||
the items in a sequence such as a QList or a QVector. QtConcurrent::map()
|
||||
the items in a sequence such as a QList. QtConcurrent::map()
|
||||
modifies a sequence in-place, QtConcurrent::mapped() returns a new
|
||||
sequence containing the modified content, and QtConcurrent::mappedReduced()
|
||||
returns a single result.
|
||||
|
@ -86,7 +86,7 @@ class IntermediateResults
|
||||
{
|
||||
public:
|
||||
int begin, end;
|
||||
QVector<T> vector;
|
||||
QList<T> vector;
|
||||
};
|
||||
|
||||
enum ReduceOption {
|
||||
|
@ -195,7 +195,7 @@ public:
|
||||
futureInterfaceTyped()->reportResult(_result, index);
|
||||
}
|
||||
|
||||
void reportResults(const QVector<T> &_result, int index = -1, int count = -1)
|
||||
void reportResults(const QList<T> &_result, int index = -1, int count = -1)
|
||||
{
|
||||
if (futureInterface)
|
||||
futureInterfaceTyped()->reportResults(_result, index, count);
|
||||
|
Loading…
Reference in New Issue
Block a user