From de59c3d9b23a5ee177cacdee6208904f31ef2c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 28 Oct 2016 09:15:24 +0200 Subject: [PATCH] [autotests] Fix TestWaylandConnectionThread::testConnectFdNoSocketName Same as 611df30ecc1d6608e42d727a2860a2645e7e4469 for the next test method. --- .../client/test_wayland_connection_thread.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/wayland/autotests/client/test_wayland_connection_thread.cpp b/src/wayland/autotests/client/test_wayland_connection_thread.cpp index 7bdda525ec..67002d0417 100644 --- a/src/wayland/autotests/client/test_wayland_connection_thread.cpp +++ b/src/wayland/autotests/client/test_wayland_connection_thread.cpp @@ -274,16 +274,18 @@ void TestWaylandConnectionThread::testConnectFdNoSocketName() QVERIFY(connectedSpy.wait()); // create the Registry - Registry registry; - QSignalSpy announcedSpy(®istry, SIGNAL(interfacesAnnounced())); + QScopedPointer registry(new Registry); + QSignalSpy announcedSpy(registry.data(), SIGNAL(interfacesAnnounced())); QVERIFY(announcedSpy.isValid()); - registry.create(connection); - EventQueue queue; - queue.setup(connection); - registry.setEventQueue(&queue); - registry.setup(); + registry->create(connection); + QScopedPointer queue(new EventQueue); + queue->setup(connection); + registry->setEventQueue(queue.data()); + registry->setup(); QVERIFY(announcedSpy.wait()); + registry.reset(); + queue.reset(); connection->deleteLater(); connectionThread->quit(); connectionThread->wait();