diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-11-20 10:43:13 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-11-28 19:08:39 +0100 |
| commit | 862a13759ba0d4ab407de3a12d019a54970fbbf3 (patch) | |
| tree | 7a31b55ab118116523cfbef26108e5ee8ae00dad /src/corelib/kernel/qjniobject.cpp | |
| parent | 6dd8e25e77cc19d2684c10bdf714c1557041b449 (diff) | |
tst_QAtomicScopedValueRollback: add a check for atomic<shared_ptr>
Unlike the non-atomic QScopedValueRollback (which has a moveOnly()
test to catch such mistakes), QAtomicScopedValueRollback was missing
some std::move()s in the implementation.
While std::atomic<unique_ptr> is not a thing™, and we thus can't add a
moveOnly() check here, atomic<shared_ptr> is, so use that to test.
This won't flag missing move()s, because shared_ptr is copyable, but a
check of the class for non-trivial payload types was missing, and this
adds that.
Pick-to: 6.10 6.8 6.5
Change-Id: Ib0ef06be9ef1a6a66564373ff74bdff35dd7b285
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/kernel/qjniobject.cpp')
0 files changed, 0 insertions, 0 deletions
