diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-02 09:39:31 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-02 09:39:31 +0200 |
commit | 166889ddcbaac91c403a840f138f25bc2907b68c (patch) | |
tree | e30d875586d782d2253b18c63e9829f246356665 /tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | |
parent | ef05c48898e90e4ff40d8c4493f4b80bc22c1703 (diff) | |
parent | ef3daddae1720956e746142ac7ee54a27b9299d7 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/corelib/kernel/qobject.cpp
Change-Id: I8ca1163a1fa8072dcd16ea4426c58219149599fd
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 2d4d5249d2..0f9e3164c3 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -10153,7 +10153,8 @@ void tst_QWidget::touchEventSynthesizedMouseEvent() // We should see propagation of the TouchBegin into a MouseButtonPress TouchMouseWidget parent; TouchMouseWidget child(&parent); - child.move(5, 5); + const QPoint childPos(5, 5); + child.move(childPos); child.setAcceptMouse(false); parent.show(); QVERIFY(QTest::qWaitForWindowExposed(parent.windowHandle())); @@ -10162,13 +10163,14 @@ void tst_QWidget::touchEventSynthesizedMouseEvent() QCOMPARE(child.m_touchEventCount, 0); QCOMPARE(child.m_mouseEventCount, 0); - QTest::touchEvent(parent.window(), m_touchScreen).press(0, QPoint(10, 10), &child); + const QPoint touchPos(20, 20); + QTest::touchEvent(parent.window(), m_touchScreen).press(0, touchPos, &child); QCOMPARE(parent.m_touchEventCount, 0); QCOMPARE(parent.m_mouseEventCount, 1); - QCOMPARE(parent.m_lastMouseEventPos, QPointF(15, 15)); + QCOMPARE(parent.m_lastMouseEventPos, childPos + touchPos); QCOMPARE(child.m_touchEventCount, 0); QCOMPARE(child.m_mouseEventCount, 1); // Attempt at mouse event before propagation - QCOMPARE(child.m_lastMouseEventPos, QPointF(10, 10)); + QCOMPARE(child.m_lastMouseEventPos, touchPos); } } |