diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-05-10 12:26:47 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-02 19:41:16 +0000 |
commit | f44a59f390be9b67365db8796aa6a54fe9241028 (patch) | |
tree | bb860d3bfe9771928a654e9c7f6809f4e1c4129c /src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | |
parent | cd0bed6d7189fe338043e5dbdf5e8b110da7b06f (diff) |
Don't assign iterator to const_iterator
It should also be possible to use QT_STRICT_ITERATORS in Qt's own code base
Change-Id: I0914db480d4d2b06e71e3a2588163efdd3ff6d27
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection_xi2.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 0e8a162a7d..c7784ddb48 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -364,8 +364,8 @@ void QXcbConnection::xi2Select(xcb_window_t window) XInput2TouchDeviceData *QXcbConnection::touchDeviceForId(int id) { XInput2TouchDeviceData *dev = Q_NULLPTR; - QHash<int, XInput2TouchDeviceData*>::const_iterator devIt = m_touchDevices.find(id); - if ( devIt != m_touchDevices.end() ) { + QHash<int, XInput2TouchDeviceData*>::const_iterator devIt = m_touchDevices.constFind(id); + if (devIt != m_touchDevices.cend()) { dev = devIt.value(); } else { int nrDevices = 0; |