diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2020-06-11 12:15:36 -0700 |
|---|---|---|
| committer | Mårten Nordheim <marten.nordheim@qt.io> | 2020-06-23 00:29:50 +0000 |
| commit | 727fab7d291d8d6e1b61a7faec4b4318f714d1e0 (patch) | |
| tree | 596b3b57f51fc9e2f5d59ba842af73eac327ad2f /src/corelib/thread/qthreadpool.cpp | |
| parent | cdcb75c46b968dbfeb1992c6bee19aceda27da38 (diff) | |
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>
Diffstat (limited to 'src/corelib/thread/qthreadpool.cpp')
0 files changed, 0 insertions, 0 deletions
