diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-23 11:37:26 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-23 08:48:25 +0000 |
commit | 5329d739eed83cc9f430f9d97652743558ccd146 (patch) | |
tree | 1b76c608cefbbc291d20828be35374977dee4ca4 /src/corelib/statemachine/qstatemachine.cpp | |
parent | f6d5c21e3e5d96f070dfa6cd208d1920459fb501 (diff) |
Fix qHash(QFontEngine::FaceId)
There were two problems:
1. qHash() hashed FaceId::uuid, but op== didn't use it for
determining equality. Thus, x == y => qHash(x) == qHash(y)
might be broken if fileName and uuid have an orthogonal
component, if you excuse my vector analogy.
2. To hash fileName and uuid, it concatenated the two,
causing a temporary QByteArray to be created just for
hashing its contents. That prevented marking qHash()
as nothrow.
Fix by using new QtPrivate::QHashCombine and adding
uuid to the list of fields compared in op==.
Change-Id: I49f2379d514d6d3669929e737562cf6de823127e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/corelib/statemachine/qstatemachine.cpp')
0 files changed, 0 insertions, 0 deletions