qt6-bb10/tests/auto/corelib/serialization/qcborvalue
Thiago Macieira 727fab7d29 QCborMap: remove the optimization not to detach from non-const find()
All our tests were find() == end() or !=, which depends on the
evaluation order of the arguments to operator==(). If end() is called
first, then the detach happens before find() and all is well. But if
find() is called first, it may return end() before end() detaches.

[ChangeLog][QCborMap] Fixed a bug that could cause the iterator returned
from a failing key search with find() not to match end(). Now, every
call to find() will detach in shared QCborMaps; to avoid this, use
constFind() and constEnd().

Fixes: QTBUG-84583
Pick-to: 5.15 5.12
Change-Id: I552d244076a447ab92d7fffd161793496a8d03a8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-06-23 00:29:50 +00:00
..
CMakeLists.txt Merge remote-tracking branch 'origin/5.15' into dev 2020-04-08 20:11:39 +02:00
qcborvalue.pro CBOR support: prevent overflowing QByteArray's max allocation 2020-03-27 16:45:48 -03:00
tst_qcborvalue.cpp QCborMap: remove the optimization not to detach from non-const find() 2020-06-23 00:29:50 +00:00