path: root/src/gui
diff options
authorMarc Mutz <>2019-05-27 16:56:12 +0200
committerMarc Mutz <>2019-05-28 21:53:17 +0200
commit2596a8a55ce3c9532701c2cf1f353b93df4bd893 (patch)
treea5fb4546a5bac5cd560abb98c8a01fe157839d7a /src/gui
parentb2587f9ea40c89e8d7c21bfeb34ccdb67c804c81 (diff)
QSharedNetworkSessionManager: clean up
Under no circumstance must Qt code define a non-public qHash() overload of a public Qt type. If you can't provide a public qHash() for the type, you can't use QHash. Period. This is because if we don't provide a qHash() function, the user will have to provide one, and then we have an ODR violation, iow: UB. So, port away from QHash and qHash and use std::unordered_map, which allows to pass a custom hash function - just what we needed. Also fix other issues of the code: - Use a function object as the deleter of the QSharedPointer, to allow inlining the function call. - Avoid double lookup in case of a cache miss. - Don't use direct initialization syntax for pointer variables. That's just ... weird. Change-Id: Ica8bff728c1bd1cbb2fb43aa03a99bcb7ac2f7cc Reviewed-by: MÃ¥rten Nordheim <>
Diffstat (limited to 'src/gui')
0 files changed, 0 insertions, 0 deletions