qt5base-lts/tests/auto/corelib
Marc Mutz 5e48a51608 Long live QAtomicScopedValueRollback (private API)!
QScopedValueRollback has a few users that apply it on QAtomicInt,
which happens to work as QAtomicInt is copy-constructible and its
ctors are implicit.

But that's of course nonsense. We don't need to store the oldValue in
an atomic, nor do we need to pass the new value into the ctor as an
atomic.

So, add a QAtomicScopedValueRollback which works on std::atomic as
well as the Qt atomics, but distinguishes between the reference (which
is atomic) and the value (which isn't), and use it in one of the
users, tst_QList.

Keep it private until we know whether there's an actual need for this.

The test is a copy of tst_qscopedvaluefallback, so the occasional
oddity (like atomic op*=) should be ignored.

Task-number: QTBUG-103835
Change-Id: I3c05b3e51f465698657a02ca5521ed465386e9a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-05-31 19:25:52 +02:00
..
animation Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
global qglobal.h: use the GCC attribute for nothrow in C mode 2022-05-27 14:12:07 -07:00
io Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
itemmodels Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
kernel Add compile-time generation of JNI class names 2022-05-27 22:27:13 +02:00
mimetypes Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
platform Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
plugin Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
serialization Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
text QStringConverter: Do not crash if invalid 2022-05-25 16:38:35 +02:00
thread Remove manual declarations of qGlobalPostedEventsCount() 2022-05-18 17:54:15 +02:00
time Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
tools Long live QAtomicScopedValueRollback (private API)! 2022-05-31 19:25:52 +02:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00