summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qnamespace.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-12-18 10:42:27 +0100
committerMarc Mutz <marc.mutz@kdab.com>2019-05-21 09:15:15 +0200
commitcea46aa3620bb16f8c03a13d900f5ce066aae21c (patch)
tree449f3cbc307350a28f4decec95e76307472a8787 /src/corelib/global/qnamespace.h
parentf7ae47ad07a24e8e26e5afcd0a9b747f25bb7129 (diff)
QGestureManager: don't abuse a QMap for a set
The filterEvents() implementations used a QMap<GestureType, int> for tracking whether a given type was already seen. The mapped_type was completely unused. Since the expected number of gesture types is very low, go directly to QVarLengthArray, not QSet, as the reduced number of allocation will dwarf the low overhead of O(N) search vs. O(1) for QSet or O(logN) for QMap. Change-Id: I98b6af69f11cca753e3c7c4fbb58e8f2e935e0d5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/global/qnamespace.h')
0 files changed, 0 insertions, 0 deletions