qt5base-lts/tests/auto/corelib/thread
Ivan Solovev 1d8dd9a02c Track progress range in QFutureInterface::setProgressValue
Previously QFutureInterface::setProgressValue was silently ignoring
the progress range and allowed to set any progress value.
Also no checks were performed in QFutureInterface::setProgressRange,
which allowed the user to set minimum > maximum.

Add checking of the current progress range, when settings the
progress value.
Add checks for minimum and maximum values while setting the progress
range.
The implementation of the checks is mostly based on the logic
that is used in QProgressBar.
- If maximum is smaller than minimum, minimum becomes the only legal
value.
- If the current progress value falls outside the new range, the
progress value is set to be minimum.
- If both progressMinimum() and progressMaximum() return 0, the
current progress range is considered to be unused, and any progress
value can be set.
- When setting the value using setProgressValue(), if the value falls
out of the progress range, the method has no effect.

Task-number: QTBUG-84729
Change-Id: I29cf4f94b8e98e1af30dd46fbdba39c421cf66bf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-11-17 16:16:31 +01:00
..
qatomicint Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00
qatomicinteger Drop constexpr from QAtomicTraits::isLockFree() 2020-10-20 10:49:30 +02:00
qatomicpointer Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qfuture Track progress range in QFutureInterface::setProgressValue 2020-11-17 16:16:31 +01:00
qfuturesynchronizer Remove the comparison operators of QFuture 2020-10-29 14:19:35 +01:00
qfuturewatcher Forbid implicit conversions between QFuture and other types 2020-10-30 17:19:26 +01:00
qmutex Split QMutex and QRecursiveMutex 2020-10-17 12:02:56 +02:00
qmutexlocker CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qpromise Track progress range in QFutureInterface::setProgressValue 2020-11-17 16:16:31 +01:00
qreadlocker CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qreadwritelock Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qresultstore Clear pending results in ResultStore 2020-10-09 16:26:01 +02:00
qsemaphore Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qthread Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qthreadonce CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qthreadpool Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qthreadstorage Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00
qwaitcondition CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qwritelocker CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
.prev_CMakeLists.txt Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00
CMakeLists.txt Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00
thread.pro Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00