equal
deleted
inserted
replaced
393 |
393 |
394 void tst_Gestures::customGesture() |
394 void tst_Gestures::customGesture() |
395 { |
395 { |
396 GestureWidget widget; |
396 GestureWidget widget; |
397 widget.grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren); |
397 widget.grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren); |
|
398 widget.show(); |
|
399 QTest::qWaitForWindowShown(&widget); |
|
400 |
398 CustomEvent event; |
401 CustomEvent event; |
|
402 event.hotSpot = widget.mapToGlobal(QPoint(5,5)); |
|
403 event.hasHotSpot = true; |
399 sendCustomGesture(&event, &widget); |
404 sendCustomGesture(&event, &widget); |
400 |
405 |
401 static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1; |
406 static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1; |
402 static const int TotalCustomEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialMaybeThreshold + 1; |
407 static const int TotalCustomEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialMaybeThreshold + 1; |
403 QCOMPARE(widget.customEventsReceived, TotalCustomEventsCount); |
408 QCOMPARE(widget.customEventsReceived, TotalCustomEventsCount); |