qt5base-lts/tests/auto/corelib/tools/qmap
Giuseppe D'Angelo 2ba1d540e6 QMultiMap: fix remove(Key, T) when key/value belong to the map
Just like any other container, it's legitimate for the user to
pass key/values belonging to the same container.
Q(Multi)Map::remove(Key) are already safe (either they call
erase() directly on std::(multi)map, where it does the right thing,
or they skip elements while detaching).
However, QMultiMap::remove(Key, T) wasn't safe in this regard
(the implementation is hand rolled), so take copies before start
erasing.

Change-Id: I87767d608b83216a6ff264fb6c8f145fdb5934f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-19 01:45:19 +02:00
..
.gitignore
.prev_CMakeLists.txt CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
CMakeLists.txt CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qmap.pro Add QT_NO_JAVA_STYLE_ITERATORS and mark QtBase free of it 2019-07-03 14:48:37 +02:00
tst_qmap.cpp QMultiMap: fix remove(Key, T) when key/value belong to the map 2020-08-19 01:45:19 +02:00