qt5base-lts/tests/auto/corelib/tools
Ahmad Samir 8e0281a8be tests/auto/: port Q_FOREACH to ranged-for, local const containers
These are local containers that are either:
- Already const and didn't need Q_FOREACH to begin with
- Can be simply made const, just by adding const keyword

In one case the unittest checked that the container's size is 1, so use
list.first() instead of a for-loop.

In files where Q_FOREACH isn't used any more, remove
"#undef QT_NO_FOREACH". Also remove those files from NO_PCH_SOURCES.

Drive-by changes:
- Remove parenthesis from one-line for-loops
- Make the for-loop variable a const& where a copy isn't needed

Task-number: QTBUG-115839
Change-Id: Ide34122b9cda798b80c4ca9d2d5af76024bc7a92
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:29:25 +03:00
..
collections Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
containerapisymmetry CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qalgorithms CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qarraydata tests/auto/: port Q_FOREACH to ranged-for, local const containers 2023-08-19 16:29:25 +03:00
qatomicscopedvaluerollback QAtomicScopedValueRollback: fix CTAD for Q(Basic)AtomicPointer 2023-07-12 10:29:44 +02:00
qbitarray CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qcache CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qcommandlineparser CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qcontiguouscache CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qcryptographichash CMake: remove check for cxx11_future 2023-08-02 12:36:18 -07:00
qduplicatetracker CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qeasingcurve tests/auto/: port Q_FOREACH to ranged-for, local const containers 2023-08-19 16:29:25 +03:00
qexplicitlyshareddatapointer tst_QExplicitlySharedDataPointer: Remove stray comment 2023-07-25 12:31:04 +02:00
qflatmap CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qfreelist Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
qhash CMake: remove check for cxx11_future 2023-08-02 12:36:18 -07:00
qhashfunctions tst_QHashFunctions: extend the consistency() test with int/FP types 2023-08-16 12:56:50 +00:00
qhashseed CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qline CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qlist tests/auto/: port Q_FOREACH to ranged-for, local const containers 2023-08-19 16:29:25 +03:00
qmacautoreleasepool CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmakearray CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmap CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmargins CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmessageauthenticationcode CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qoffsetstringarray CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qpair CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qpoint CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qpointf CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qqueue CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qrect CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qringbuffer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qscopedpointer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qscopedvaluerollback CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qscopeguard tst_QScopeGuard: test if and how guard in optional<> works 2023-07-10 19:47:08 +00:00
qset CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsharedpointer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsize CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsizef CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qspan Long live QSpan! 2023-07-21 17:00:05 +00:00
qstl CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qtaggedpointer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qtimeline CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qvarlengtharray CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qversionnumber CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt Long live QSpan! 2023-07-21 17:00:05 +00:00