diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-02-13 15:18:43 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-02-20 13:55:33 +0000 |
commit | 8967a1b7b86306879a3113b290610b03727670ff (patch) | |
tree | 444521cfa170c04890745b66365123fcdd4eff3a /tests/auto/quick/pointerhandlers | |
parent | e9a2155cfd76666043dee8c034708a0149f3e2e6 (diff) |
clarify further exclusive vs. passive grabs
Add documentation to the grab-related event and eventpoint methods.
Rename "grabber" functions which relate only to the exclusive grab,
in cases where it would otherwise be ambiguous.
And a few other documentation changes.
Change-Id: I1a203c8c06a19d4abdb000f08b387c38341ef476
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/auto/quick/pointerhandlers')
-rw-r--r-- | tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp b/tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp index 736555c378..d822330f21 100644 --- a/tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp +++ b/tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp @@ -164,7 +164,7 @@ class EventHandler : public QQuickPointerHandler point->setAccepted(item->acceptPointer); // does NOT imply a grab if (item->grabPointer) setExclusiveGrab(point, true); - qCDebug(lcPointerTests) << " " << i << ":" << point << "accepted?" << item->acceptPointer << "grabbed?" << (point->grabber() == this); + qCDebug(lcPointerTests) << " " << i << ":" << point << "accepted?" << item->acceptPointer << "grabbed?" << (point->exclusiveGrabber() == this); item->eventList.append(Event(QEvent::Pointer, eventPos(point), point->scenePos())); } } @@ -262,7 +262,7 @@ void tst_PointerHandlers::touchEventDelivery() QCOMPARE(eventItem1->eventList.at(0).type, QEvent::Pointer); QCOMPARE(eventItem1->eventList.at(1).type, QEvent::TouchBegin); auto pointerEvent = QQuickPointerDevice::touchDevices().at(0)->pointerEvent(); - QCOMPARE(pointerEvent->point(0)->grabber(), eventItem1); + QCOMPARE(pointerEvent->point(0)->exclusiveGrabber(), eventItem1); p1 += QPoint(10, 0); QTest::touchEvent(window, touchDevice).move(0, p1, window); QQuickTouchUtils::flush(window); @@ -329,7 +329,7 @@ void tst_PointerHandlers::touchEventDelivery() QCOMPARE(eventItem1->eventList.at(0).type, QEvent::Pointer); QCOMPARE(eventItem1->eventList.at(1).type, QEvent::TouchBegin); QCOMPARE(eventItem1->eventList.at(2).type, QEvent::MouseButtonPress); - QCOMPARE(pointerEvent->point(0)->grabber(), nullptr); + QCOMPARE(pointerEvent->point(0)->exclusiveGrabber(), nullptr); p1 += QPoint(10, 0); QTest::touchEvent(window, touchDevice).move(0, p1, window); QQuickTouchUtils::flush(window); |