qt5base-lts/tests
Sona Kurazyan bd1023a824 QtConcurrent: prevent conversion of ReduceOption to initial value
QtConcurrent map- and filter-reduce functions take an initial value,
which can be of any type that is convertable to the result type. The
side-effect of this is that the enum values passed as ReduceOptions can
be treated as an initial value (if they are convertable to the result
type) which will result into a wrong overload call. To avoid this, added
additional check to make sure that the initial value type doesn't match
with ReduceOption enum.

Note that this required including the qtconcurrentreducekernel.h header
in qtconcurrentfunctionwrappers.h (which contains compiler checks for
QtConcurrent) for accessing ReduceOption enum, so I had to get rid of
qtconcurrentfunctionwrappers.h include from qtconcurrentreducekernel.h
to avoid circular header includes. This, in turn, required moving the
QtPrivate::SequenceHolder helper type to qtconcurrentreducekernel.h,
which didn't belong to qtconcurrentfunctionwrappers.h anyway.

Pick-to: 6.3 6.2
Fixes: QTBUG-102999
Change-Id: Ieaa8ef2e4bd82ce2ada2e0af9a47b87b51d59e87
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-20 17:11:15 +02:00
..
auto QtConcurrent: prevent conversion of ReduceOption to initial value 2022-05-20 17:11:15 +02:00
baseline Stylesheet: Another positioning fix for the menu indicator 2022-05-18 13:15:00 +02:00
benchmarks Fix crash in tst_qquicktext::implicitSize 2022-05-20 13:14:01 +02:00
global
libfuzzer Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
manual Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
testserver Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
CMakeLists.txt CMake: Refactor optimization flag handling and add optimize_full 2020-10-06 10:07:05 +02:00
README

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.