diff options
-rw-r--r-- | tests/auto/websockets/qwebsocket/qwebsocket.pro | 2 | ||||
-rw-r--r-- | tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/websockets/qwebsocket/qwebsocket.pro b/tests/auto/websockets/qwebsocket/qwebsocket.pro index 0155d08..1b08dc7 100644 --- a/tests/auto/websockets/qwebsocket/qwebsocket.pro +++ b/tests/auto/websockets/qwebsocket/qwebsocket.pro @@ -9,5 +9,3 @@ TARGET = tst_qwebsocket TEMPLATE = app SOURCES += tst_qwebsocket.cpp - -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp b/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp index f993f84..789d1fa 100644 --- a/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp +++ b/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp @@ -424,7 +424,9 @@ void tst_QWebSocket::tst_sendTextMessage() QUrl url = QUrl(QStringLiteral("ws://") + echoServer.hostAddress().toString() + QStringLiteral(":") + QString::number(echoServer.port())); url.setPath("/segment/with spaces"); - url.addQueryItem("queryitem", "with encoded characters"); + QUrlQuery query; + query.addQueryItem("queryitem", "with encoded characters"); + url.setQuery(query); socket.open(url); @@ -588,7 +590,9 @@ void tst_QWebSocket::tst_openRequest() QUrl url = QUrl(QStringLiteral("ws://") + echoServer.hostAddress().toString() + QLatin1Char(':') + QString::number(echoServer.port())); - url.addQueryItem("queryitem", "with encoded characters"); + QUrlQuery query; + query.addQueryItem("queryitem", "with encoded characters"); + url.setQuery(query); QNetworkRequest req(url); req.setRawHeader("X-Custom-Header", "A custom header"); socket.open(req); |