Fix QPointerEvent::allPointsGrabbed()

Amends 8932e80d0c8879a1e720fef825ed0d9c4e384a01 to make implementation
match docs: the ! went missing during repeated patch rebasing, apparently.

Task-number: QTBUG-101932
Change-Id: I3fe910774f5bdf4ab0342a9cf1994bb489f20e87
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 65adfd5ec593a20223723c2b6f832da1a93c39b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Shawn Rutledge 2022-07-07 20:19:02 +02:00 committed by Qt Cherry-pick Bot
parent 0c9fc4bfa7
commit a85b274a37

View File

@ -264,12 +264,13 @@ QEventPoint *QPointerEvent::pointById(int id)
} }
/*! /*!
Returns \c true if every point in points() has an exclusiveGrabber(). Returns \c true if every point in points() has either an exclusiveGrabber()
or one or more passiveGrabbers().
*/ */
bool QPointerEvent::allPointsGrabbed() const bool QPointerEvent::allPointsGrabbed() const
{ {
for (const auto &p : points()) { for (const auto &p : points()) {
if (exclusiveGrabber(p) && passiveGrabbers(p).isEmpty()) if (!exclusiveGrabber(p) && passiveGrabbers(p).isEmpty())
return false; return false;
} }
return true; return true;