summaryrefslogtreecommitdiffstats
path: root/src/gui/platform/unix/qgenericunixservices.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-04-03 15:03:04 -0300
committerThiago Macieira <thiago.macieira@intel.com>2023-04-04 08:59:32 -0300
commit87103e04e9c34630bd51ae5f8e7550033976c6bf (patch)
tree6239a73748c857d5a9028c592aff5cd356d55e40 /src/gui/platform/unix/qgenericunixservices.cpp
parent59466abc080419465606240a02d333aac9b712ce (diff)
QMultiHash: fix missing update to m_size
QMultiHash has access to two sizes: one of them is shared with QHash, stored in QHashPrivate::Data::size, which counts keys; the other, which is what our public size() function returns, is stored in QMultiHash::m_size and counts plain (key,value) entries. We forgot to update it in the non-const operator[] that created a node. I've reviewed the rest of the code and can't find any more places where the item count may be changed and m_size isn't updated. [ChangeLog][QtCore][QMultiHash] Fixed a bug that caused an element that was created by operator[] to not be counted, resulting in a hash map with an incorrect element count and which could cause an assertion failure depending on how the hash was later mutated. Fixes: QTBUG-112534 Pick-to: 6.2 6.4 6.5 Change-Id: Idd5e1bb52be047d7b4fffffd17527ec274e1d99e Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'src/gui/platform/unix/qgenericunixservices.cpp')
0 files changed, 0 insertions, 0 deletions