Commit a94f5c0d authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Vlad Zahorodnii
Browse files

wayland/autotests: Make sure SeatInterface gets deleted

parent 4af69643
......@@ -32,7 +32,7 @@ void TestWaylandServerSeat::testCapabilities()
KWaylandServer::Display display;
display.addSocketName(s_socketName);
display.start();
SeatInterface *seat = new SeatInterface(&display);
SeatInterface *seat = new SeatInterface(&display, &display);
QVERIFY(!seat->hasKeyboard());
QVERIFY(!seat->hasPointer());
QVERIFY(!seat->hasTouch());
......@@ -82,7 +82,7 @@ void TestWaylandServerSeat::testName()
KWaylandServer::Display display;
display.addSocketName(s_socketName);
display.start();
SeatInterface *seat = new SeatInterface(&display);
SeatInterface *seat = new SeatInterface(&display, &display);
QCOMPARE(seat->name(), QString());
QSignalSpy nameSpy(seat, SIGNAL(nameChanged(QString)));
......@@ -101,7 +101,7 @@ void TestWaylandServerSeat::testPointerButton()
KWaylandServer::Display display;
display.addSocketName(s_socketName);
display.start();
SeatInterface *seat = new SeatInterface(&display);
SeatInterface *seat = new SeatInterface(&display, &display);
seat->setHasPointer(true);
// no button pressed yet, should be released and no serial
......@@ -132,7 +132,7 @@ void TestWaylandServerSeat::testPointerPos()
KWaylandServer::Display display;
display.addSocketName(s_socketName);
display.start();
SeatInterface *seat = new SeatInterface(&display);
SeatInterface *seat = new SeatInterface(&display, &display);
seat->setHasPointer(true);
QSignalSpy seatPosSpy(seat, SIGNAL(pointerPosChanged(QPointF)));
QVERIFY(seatPosSpy.isValid());
......@@ -162,7 +162,7 @@ void TestWaylandServerSeat::testRepeatInfo()
KWaylandServer::Display display;
display.addSocketName(s_socketName);
display.start();
SeatInterface *seat = new SeatInterface(&display);
SeatInterface *seat = new SeatInterface(&display, &display);
seat->setHasKeyboard(true);
QCOMPARE(seat->keyboard()->keyRepeatRate(), 0);
QCOMPARE(seat->keyboard()->keyRepeatDelay(), 0);
......@@ -181,14 +181,14 @@ void TestWaylandServerSeat::testMultiple()
display.addSocketName(s_socketName);
display.start();
QVERIFY(display.seats().isEmpty());
SeatInterface *seat1 = new SeatInterface(&display);
SeatInterface *seat1 = new SeatInterface(&display, &display);
QCOMPARE(display.seats().count(), 1);
QCOMPARE(display.seats().at(0), seat1);
SeatInterface *seat2 = new SeatInterface(&display);
SeatInterface *seat2 = new SeatInterface(&display, &display);
QCOMPARE(display.seats().count(), 2);
QCOMPARE(display.seats().at(0), seat1);
QCOMPARE(display.seats().at(1), seat2);
SeatInterface *seat3 = new SeatInterface(&display);
SeatInterface *seat3 = new SeatInterface(&display, &display);
QCOMPARE(display.seats().count(), 3);
QCOMPARE(display.seats().at(0), seat1);
QCOMPARE(display.seats().at(1), seat2);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment