diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qpointingdevice.cpp | 1 | ||||
-rw-r--r-- | src/gui/kernel/qpointingdevice_p.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qpointingdevice.cpp b/src/gui/kernel/qpointingdevice.cpp index d9ce0b0cf9b..cf2ebf03479 100644 --- a/src/gui/kernel/qpointingdevice.cpp +++ b/src/gui/kernel/qpointingdevice.cpp @@ -465,6 +465,7 @@ void QPointingDevicePrivate::setExclusiveGrabber(const QPointerEvent *event, con qWarning() << "point is not in activePoints" << point; return; } + Q_ASSERT(persistentPoint->eventPoint.id() == point.id()); if (persistentPoint->exclusiveGrabber == exclusiveGrabber) return; auto oldGrabber = persistentPoint->exclusiveGrabber; diff --git a/src/gui/kernel/qpointingdevice_p.h b/src/gui/kernel/qpointingdevice_p.h index 3638dbc39a2..403a54dc4fb 100644 --- a/src/gui/kernel/qpointingdevice_p.h +++ b/src/gui/kernel/qpointingdevice_p.h @@ -72,7 +72,7 @@ public: void clearPassiveGrabbers(const QPointerEvent *event, const QEventPoint &point); void removeGrabber(QObject *grabber, bool cancel = false); - using EventPointMap = QFlatMap<int, EventPointData>; + using EventPointMap = QVarLengthFlatMap<int, EventPointData, 20>; mutable EventPointMap activePoints; QPointingDeviceUniqueId uniqueId; |