diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-04-29 12:03:36 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-04-29 16:49:57 +0200 |
commit | 2ecd0f4194dd23dd0917df81007c933cfcd4e6a5 (patch) | |
tree | 6ea13ed887f9498f91eafb275681e3b8ca1aa5c4 /tests/auto/gui | |
parent | 9bad096c091b2c2106c2f325dfca74be111eee58 (diff) |
Revert "Add grabber context pointers"
This reverts commit 40330b8f0a717098982d1f54f34a18a8262b1f55.
It was a bad idea to use QFlatMap here, because it is a sorted map, but
we need to keep the passive grabbers in the same order as the grabs happened.
So need to go back to an earlier version of the patch that uses two parallel QLists.
Pick-to: 6.1
Change-Id: I9e6013c2565986fe1eb9fd754f8259766f83bee5
Reviewed-by: Fabian Kosmale <fabian.kosmale@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 cdf11ec54a..d5174e0942 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.keys().first(), testMouseWidget); + QCOMPARE(firstEPD->passiveGrabbers.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 fa3f495c23..28c33e8226 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.keys().first(), &w); + QCOMPARE(devPriv->pointById(0)->passiveGrabbers.first(), &w); // Ensure that eventpoints are forgotten after release delivery points.first().state = QEventPoint::State::Released; |