QHttpServerRequestFilter: avoid double lookup in isRequestWithinRate()
The old code used find() followed by emplace() if not found. This
means a new entry required two lookups. Use the new
QHash::try_emplace() to do both find() and emplace() in one go.
Unfortunately, using the std-compliant try_emplace() would have
required a larger rewrite, as it returns a KeyValueIterator, while the
following code expects an old-style Qt QHash::iterator, so use the
non-standard tryEmplace().
Amends c43b2f7a84ca1141b4d7d323d8b6cac7c75aa7e5.
Pick-to: 6.10 6.9
Change-Id: I76ee9fac49f41c62d0b95c4c2f20ac6c42edd4cc
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>