aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-02-13 15:18:43 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-02-20 13:55:33 +0000
commit8967a1b7b86306879a3113b290610b03727670ff (patch)
tree444521cfa170c04890745b66365123fcdd4eff3a /tests/auto/quick
parente9a2155cfd76666043dee8c034708a0149f3e2e6 (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')
-rw-r--r--tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp6
-rw-r--r--tests/auto/quick/touchmouse/tst_touchmouse.cpp6
2 files changed, 6 insertions, 6 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);
diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
index 4f4fac8fa5..bb251023c7 100644
--- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp
+++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
@@ -564,7 +564,7 @@ void tst_TouchMouse::buttonOnFlickable()
QQuickWindowPrivate *windowPriv = QQuickWindowPrivate::get(window.data());
QVERIFY(windowPriv->touchMouseId != -1);
auto pointerEvent = QQuickPointerDevice::touchDevices().at(0)->pointerEvent();
- QCOMPARE(pointerEvent->point(0)->grabber(), eventItem1);
+ QCOMPARE(pointerEvent->point(0)->exclusiveGrabber(), eventItem1);
QCOMPARE(window->mouseGrabberItem(), eventItem1);
p1 += QPoint(0, -10);
@@ -585,7 +585,7 @@ void tst_TouchMouse::buttonOnFlickable()
QCOMPARE(window->mouseGrabberItem(), flickable);
QVERIFY(windowPriv->touchMouseId != -1);
- QCOMPARE(pointerEvent->point(0)->grabber(), flickable);
+ QCOMPARE(pointerEvent->point(0)->exclusiveGrabber(), flickable);
QVERIFY(flickable->isMovingVertically());
QTest::touchEvent(window.data(), device).release(0, p3, window.data());
@@ -690,7 +690,7 @@ void tst_TouchMouse::buttonOnDelayedPressFlickable()
QCOMPARE(window->mouseGrabberItem(), flickable);
QVERIFY(windowPriv->touchMouseId != -1);
auto pointerEvent = QQuickPointerDevice::touchDevices().at(0)->pointerEvent();
- QCOMPARE(pointerEvent->point(0)->grabber(), flickable);
+ QCOMPARE(pointerEvent->point(0)->exclusiveGrabber(), flickable);
QTest::touchEvent(window.data(), device).release(0, p3, window.data());
QQuickTouchUtils::flush(window.data());