diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-04-19 16:00:35 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-04-28 13:00:45 +0200 |
commit | 40330b8f0a717098982d1f54f34a18a8262b1f55 (patch) | |
tree | 3c64634f4876f533e168b577579ae2720aef5711 /tests/auto/gui | |
parent | bb5d2af7677a14f2aaeffb0e29679d9dcce692e6 (diff) |
Add grabber context pointers
In Qt Quick we now need to keep track of which QQDeliveryAgent is
responsible when a point is grabbed, either passively or exclusively.
When we re-deliver to that grabber, we need to do it via the same agent,
so that the same scene transform is used, and the grabber will see the
event in the correct coordinate system. It's easier to track this
mapping here instead of in a separate map in Qt Quick.
Pick-to: 6.1
Task-number: QTBUG-92944
Change-Id: I69f769c694d0da24885cdf4087e5032022bff629
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp | 2 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp index d5174e0942..cdf11ec54a 100644 --- a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp +++ b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp @@ -290,7 +290,7 @@ void tst_QMouseEvent::grabbers() QCOMPARE(firstEPD->exclusiveGrabber, grabExclusive ? testMouseWidget : nullptr); QCOMPARE(firstEPD->passiveGrabbers.count(), grabPassive ? 1 : 0); if (grabPassive) - QCOMPARE(firstEPD->passiveGrabbers.first(), testMouseWidget); + QCOMPARE(firstEPD->passiveGrabbers.keys().first(), testMouseWidget); // Ensure that grabbers are forgotten after release delivery QTest::mouseRelease(testMouseWidget, Qt::LeftButton, Qt::KeyboardModifiers(), {10, 10}); diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp index 28c33e8226..fa3f495c23 100644 --- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp +++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp @@ -1949,7 +1949,7 @@ void tst_QTouchEvent::grabbers() QCOMPARE(devPriv->pointById(0)->exclusiveGrabber, grabExclusive ? &w : nullptr); QCOMPARE(devPriv->pointById(0)->passiveGrabbers.count(), grabPassive ? 1 : 0); if (grabPassive) - QCOMPARE(devPriv->pointById(0)->passiveGrabbers.first(), &w); + QCOMPARE(devPriv->pointById(0)->passiveGrabbers.keys().first(), &w); // Ensure that eventpoints are forgotten after release delivery points.first().state = QEventPoint::State::Released; |