autotests: Fix TestXdgShellWindow in Qt 6 build
TestXdgShellWindow::testPointerInputTransform() compares QVariant(QPointF) with QPoint. While this works in Qt 5, Qt 6 seems to take the type into account when comparing the two.
This commit is contained in:
parent
0ce90f4335
commit
6e5267551e
1 changed files with 4 additions and 4 deletions
|
@ -1446,9 +1446,9 @@ void TestXdgShellWindow::testPointerInputTransform()
|
||||||
|
|
||||||
// Move the pointer to (10, 5) relative to the upper left frame corner, which is located
|
// Move the pointer to (10, 5) relative to the upper left frame corner, which is located
|
||||||
// at (0, 0) in the surface-local coordinates.
|
// at (0, 0) in the surface-local coordinates.
|
||||||
Test::pointerMotion(window->pos() + QPoint(10, 5), timestamp++);
|
Test::pointerMotion(window->pos() + QPointF(10, 5), timestamp++);
|
||||||
QVERIFY(pointerMotionSpy.wait());
|
QVERIFY(pointerMotionSpy.wait());
|
||||||
QCOMPARE(pointerMotionSpy.last().first(), QPoint(10, 5));
|
QCOMPARE(pointerMotionSpy.last().first().toPointF(), QPointF(10, 5));
|
||||||
|
|
||||||
// Let's pretend that the window has changed the extents of the client-side drop-shadow
|
// Let's pretend that the window has changed the extents of the client-side drop-shadow
|
||||||
// but the frame geometry didn't change.
|
// but the frame geometry didn't change.
|
||||||
|
@ -1463,9 +1463,9 @@ void TestXdgShellWindow::testPointerInputTransform()
|
||||||
|
|
||||||
// Move the pointer to (20, 50) relative to the upper left frame corner, which is located
|
// Move the pointer to (20, 50) relative to the upper left frame corner, which is located
|
||||||
// at (10, 20) in the surface-local coordinates.
|
// at (10, 20) in the surface-local coordinates.
|
||||||
Test::pointerMotion(window->pos() + QPoint(20, 50), timestamp++);
|
Test::pointerMotion(window->pos() + QPointF(20, 50), timestamp++);
|
||||||
QVERIFY(pointerMotionSpy.wait());
|
QVERIFY(pointerMotionSpy.wait());
|
||||||
QCOMPARE(pointerMotionSpy.last().first(), QPoint(10, 20) + QPoint(20, 50));
|
QCOMPARE(pointerMotionSpy.last().first().toPointF(), QPointF(10, 20) + QPointF(20, 50));
|
||||||
|
|
||||||
// Destroy the xdg-toplevel surface.
|
// Destroy the xdg-toplevel surface.
|
||||||
shellSurface.reset();
|
shellSurface.reset();
|
||||||
|
|
Loading…
Reference in a new issue