qt5base-lts/tests/auto/corelib/tools/collections
Sona Kurazyan 9f13842fe6 Fix compilation for recursive Qt containers
The operator checks cause compilation errors when trying to check for
their existence for recursive containers. This happens because of trying
to check for the operators on the template parameter type(s), that
inherit from the container itself, which leads to compilation errors.
Introduced alternative versions of the operator checks (with _container
suffix), that first check if the container is recursive, i.e. any of its
template parameter types inherits from the given container, and skips
the operator check, if that's the case.

The fix is done for all Qt container types that had the problem, except
for QVarLengthArray and QContiguousCache, which don't compile with
recursive parameter types for unrelated reasons.

Fixes: QTBUG-91707
Pick-to: 6.2 6.1
Change-Id: Ia1e7240b4ce240c1c44f00ca680717d182df7550
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-09-07 15:48:35 +02:00
..
.gitignore Move tst_collections test to corelib/tools. 2014-05-13 16:08:01 +02:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
tst_collections.cpp Fix compilation for recursive Qt containers 2021-09-07 15:48:35 +02:00