summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-24 15:06:24 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-10-26 11:21:04 +0000
commiteabc463b8059460c99e5f338b3b92c4515af7770 (patch)
tree808d5674930b3f3847213c494ab1a5c72daf3186
parent825df0cef516fb84adab88a31106e214f2b29b2d (diff)
downloadqtwebsockets-eabc463b8059460c99e5f338b3b92c4515af7770.tar.gz
test: fix tst_QWebSocket::tst_moveToThread()
Task-number: QTBUG-63707 Change-Id: Iaba78256f790bc422790a03fccb841e6e6482fc1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-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()