[autotest] fix WaylandConnectionThread::testConnectFd
The test destroyed the connection prior to destroying registry and event queue. Thus causing problems. Hopefully this change fixes the segfault on build.kde.org.
This commit is contained in:
parent
3f0c879713
commit
611df30ecc
1 changed files with 9 additions and 7 deletions
|
@ -226,16 +226,18 @@ void TestWaylandConnectionThread::testConnectFd()
|
||||||
QVERIFY(connectedSpy.wait());
|
QVERIFY(connectedSpy.wait());
|
||||||
|
|
||||||
// create the Registry
|
// create the Registry
|
||||||
Registry registry;
|
QScopedPointer<Registry> registry(new Registry);
|
||||||
QSignalSpy announcedSpy(®istry, SIGNAL(interfacesAnnounced()));
|
QSignalSpy announcedSpy(registry.data(), SIGNAL(interfacesAnnounced()));
|
||||||
QVERIFY(announcedSpy.isValid());
|
QVERIFY(announcedSpy.isValid());
|
||||||
registry.create(connection);
|
registry->create(connection);
|
||||||
EventQueue queue;
|
QScopedPointer<EventQueue> queue(new EventQueue);
|
||||||
queue.setup(connection);
|
queue->setup(connection);
|
||||||
registry.setEventQueue(&queue);
|
registry->setEventQueue(queue.data());
|
||||||
registry.setup();
|
registry->setup();
|
||||||
QVERIFY(announcedSpy.wait());
|
QVERIFY(announcedSpy.wait());
|
||||||
|
|
||||||
|
registry.reset();
|
||||||
|
queue.reset();
|
||||||
connection->deleteLater();
|
connection->deleteLater();
|
||||||
connectionThread->quit();
|
connectionThread->quit();
|
||||||
connectionThread->wait();
|
connectionThread->wait();
|
||||||
|
|
Loading…
Reference in a new issue