diff options
author | Marc Mutz <[email protected]> | 2015-06-21 12:42:35 +0200 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2016-01-20 21:17:53 +0000 |
commit | 198768cbbaf5163ac6e6536994273e039bd3c64f (patch) | |
tree | 47395e04a816f8926703e82122899ebf2665260c /src/tools/uic/cpp/cppwriteicondata.cpp | |
parent | 49a61f35f34028c72deb8669a2162bbfd8e1a9fd (diff) |
QWidget: fix expensive iteration over QMap::keys()
... with iteration over the hash itself.
Can't keep the call to ungrabGesture() in the loop,
because it removes the current element from the very
hash being iterated over. Instead, inline the call
and optimize based on the context:
- don't remove element by element, but clear the
hash completely at the end.
- drag the check for QGestureManager::instance()
out of the loop.
- drop the check for presence of the key in the
hash, since it would be always true.
Change-Id: I6bf7cc8a59a51ccc8046a5b6d1cab5784e79fd55
Reviewed-by: Friedemann Kleint <[email protected]>
Diffstat (limited to 'src/tools/uic/cpp/cppwriteicondata.cpp')
0 files changed, 0 insertions, 0 deletions