diff options
author | Liang Qi <liang.qi@qt.io> | 2017-10-24 15:06:24 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-10-26 11:21:04 +0000 |
commit | eabc463b8059460c99e5f338b3b92c4515af7770 (patch) | |
tree | 808d5674930b3f3847213c494ab1a5c72daf3186 /tests/auto | |
parent | 825df0cef516fb84adab88a31106e214f2b29b2d (diff) | |
download | qtwebsockets-eabc463b8059460c99e5f338b3b92c4515af7770.tar.gz |
test: fix tst_QWebSocket::tst_moveToThread()
Task-number: QTBUG-63707
Change-Id: Iaba78256f790bc422790a03fccb841e6e6482fc1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp | 4 |
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() |