qt5base-lts/tests/auto/corelib/thread/qfuture
Sona Kurazyan 08de1fb281 Don't report results when the results list is empty
When inserting items into the result store, a ResultItem is created,
which stores a pointer to the results list and their size. If the size
of the ResultItem is set to 0, it means that a single result is stored.
In case of trying to report results via an empty list, the size is 0, so
result store treats it as a single result.

Added checks before storing the results to make sure that the result
list isn't empty. Note that empty lists are allowed in some cases for
the filter mode, because ResultStoreBase::addResults() knows how to
handle those cases correctly.

Task-number: QTBUG-80957
Pick-to: 5.15 6.1 6.2
Change-Id: I399af4c3eef6adf82fea5df031fe9a9075006b1f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-07-27 19:57:27 +02:00
..
.gitignore Move QFuture from QtConcurrent to QtCore 2012-09-28 23:50:10 +02:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
tst_qfuture.cpp Don't report results when the results list is empty 2021-07-27 19:57:27 +02:00