summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-05-07 11:44:37 +0200
committerLiang Qi <liang.qi@qt.io>2019-05-07 11:58:30 +0200
commitc2b553784dfbe0ece90f79709639e27e74359a7d (patch)
tree04b0c74c7417a5f1b628d0b18a07f9dd8be1df60 /tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
parent0b373c2e36a68aedf3731fcb3cd84fd010c2d67c (diff)
parent8ea0a82a6a771dd76df2d51c6ef3ed966a5b9b45 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qvariant.h src/corelib/tools/qlist.h Done-With: Milian Wolff <milian.wolff@kdab.com> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp10
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 9e30f17fa9..89da56cd0c 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -10161,7 +10161,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()));
@@ -10170,13 +10171,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);
}
}