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:
Jarek Kobus 2020-06-22 10:25:58 +02:00
parent c068b80727
commit 4a12757e5d
5 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@
The QtConcurrent::filter(), QtConcurrent::filtered() and The QtConcurrent::filter(), QtConcurrent::filtered() and
QtConcurrent::filteredReduced() functions filter items in a sequence such 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 sequence in-place, QtConcurrent::filtered() returns a new sequence
containing the filtered content, and QtConcurrent::filteredReduced() containing the filtered content, and QtConcurrent::filteredReduced()
returns a single result. returns a single result.

View File

@ -124,7 +124,7 @@ public:
int currentResultCount; int currentResultCount;
ThreadEngine<T> *threadEngine; ThreadEngine<T> *threadEngine;
QVector<T> vector; QList<T> vector;
}; };
template <> template <>

View File

@ -148,7 +148,7 @@
The QtConcurrent::map(), QtConcurrent::mapped() and The QtConcurrent::map(), QtConcurrent::mapped() and
QtConcurrent::mappedReduced() functions run computations in parallel on 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 modifies a sequence in-place, QtConcurrent::mapped() returns a new
sequence containing the modified content, and QtConcurrent::mappedReduced() sequence containing the modified content, and QtConcurrent::mappedReduced()
returns a single result. returns a single result.

View File

@ -86,7 +86,7 @@ class IntermediateResults
{ {
public: public:
int begin, end; int begin, end;
QVector<T> vector; QList<T> vector;
}; };
enum ReduceOption { enum ReduceOption {

View File

@ -195,7 +195,7 @@ public:
futureInterfaceTyped()->reportResult(_result, index); 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) if (futureInterface)
futureInterfaceTyped()->reportResults(_result, index, count); futureInterfaceTyped()->reportResults(_result, index, count);