summaryrefslogtreecommitdiff
path: root/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp')
-rw-r--r--tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp b/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp
index e9062c0..ac54270 100644
--- a/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp
+++ b/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp
@@ -659,7 +659,7 @@ void tst_QWebSocket::tst_moveToThread()
EchoServer echoServer;
- QThread* thread = new QThread;
+ QThread* thread = new QThread(this);
thread->start();
WebSocket* socket = new WebSocket;
@@ -696,7 +696,7 @@ void tst_QWebSocket::tst_moveToThread()
socket->deleteLater();
thread->quit();
- thread->deleteLater();
+ thread->wait();
}
void tst_QWebSocket::tst_moveToThreadNoWarning()