Code review comment for lp:~nick-dedekind/unity8/side-stage-redesign

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> tst_TouchGestureArea.cpp is not using QTest::touchEvent correctly.
>
> Look at this sequence:
>
> """
> QTest::touchEvent(m_view, m_device).press(0, touchPoint.toPoint());
>
> QTest::touchEvent(m_view, m_device).press(1, touchPoint.toPoint());
>
> QTest::touchEvent(m_view, m_device).press(2, touchPoint.toPoint());
> """
>
> On each subsequent QTouchEvent you're forgetting about the previouly pressed
> touch points. So this sequence is invalid. It should be something like this:
>
> """
> QTest::touchEvent(m_view, m_device).press(0, touchPoint.toPoint());
>
> QTest::touchEvent(m_view, m_device)
> .move(0, touchPoint0)
> .press(1, touchPoint.toPoint());
>
> QTest::touchEvent(m_view, m_device)
> .move(0, touchPoint0)
> .move(1, touchPoint1);
> .press(2, touchPoint.toPoint());
> """
>
> Ie, a QTouchEvent must mention every single active touch point. See
> tst_DirectionalDragArea.cpp for some usage examples.

Yeah, forgot about this; i've done it before. used TouchEvent::stationary.

« Back to merge proposal