tst_QGestureRecognizer::touchReplay give fix position
tst_QGestureRecognizer::panGesture() is flaky as sometimes the gesture event is being sent outside of the parent. It is being sent in the window frame instead of in the widget. Fix position of the parent and verify that it is correct. Fix flakiness on Opensuse 15 Change-Id: I00eacb80a7e2e658345d3bc56cdef0c0024d1a1d Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 3766b9cb3cb49fdef626526181b6a7fe26870e29) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 69738c76b49dc2f6ce77d9db0fbcb08eed7ecff9)
This commit is contained in:
parent
e1d742ae3b
commit
9eec05de3f
@ -307,13 +307,16 @@ void tst_QGestureRecognizer::swipeGesture()
|
||||
void tst_QGestureRecognizer::touchReplay()
|
||||
{
|
||||
const Qt::GestureType gestureType = Qt::TapGesture;
|
||||
const QPoint pos = QGuiApplication::primaryScreen()->availableGeometry().topLeft();
|
||||
QWidget parent;
|
||||
TestWidget widget(GestureTypeVector(1, gestureType));
|
||||
widget.setParent(&parent);
|
||||
widget.setGeometry(0, 0, 100, 100);
|
||||
parent.adjustSize();
|
||||
parent.move(pos);
|
||||
parent.show();
|
||||
QVERIFY(QTest::qWaitForWindowActive(&parent));
|
||||
QTRY_COMPARE(parent.pos(), pos);
|
||||
|
||||
QWindow* windowHandle = parent.window()->windowHandle();
|
||||
const QPoint globalPos = QPoint(42, 16);
|
||||
|
Loading…
x
Reference in New Issue
Block a user