summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-25 09:49:22 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-31 09:09:08 +0000
commit39cf3bf47edc16bb9eb54ee58c36bf15cff1513d (patch)
tree70669fa55fc93e658a1aac76a95fd75747e2ee28
parentd97d5e7a083ab9ea0de7b351de0a566e630f7d41 (diff)
downloadqtwebsockets-39cf3bf47edc16bb9eb54ee58c36bf15cff1513d.tar.gz
Tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0.
Fix usage of API that is marked deprecated. Change-Id: Ie1bd25b22a8bd4faa6885ac3670dcc3c25c17ab2 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
-rw-r--r--tests/auto/websockets/qwebsocket/qwebsocket.pro2
-rw-r--r--tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp8
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);