From 2954e0112aac4d76aa8c78b3261de665621edbc6 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Sat, 30 Jun 2018 14:35:43 +0200 Subject: Migrate tst_handshakeresponse to QRegularExpression This patch updates the tst_handshakeresponse test to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: I98febd0565351b644dd68b98d356764bee78d7c5 Reviewed-by: Liang Qi --- tests/auto/websockets/handshakeresponse/tst_handshakeresponse.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/websockets/handshakeresponse/tst_handshakeresponse.cpp b/tests/auto/websockets/handshakeresponse/tst_handshakeresponse.cpp index 1724167..9a7c590 100644 --- a/tests/auto/websockets/handshakeresponse/tst_handshakeresponse.cpp +++ b/tests/auto/websockets/handshakeresponse/tst_handshakeresponse.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "private/qwebsockethandshakerequest_p.h" @@ -97,7 +98,7 @@ void tst_HandshakeResponse::tst_date_response() output << response; QStringList list = data.split("\r\n"); - int index = list.indexOf(QRegExp("Date:.*")); + int index = list.indexOf(QRegularExpression("Date:.*")); QVERIFY(index > -1); QVERIFY(QLocale::c().toDateTime(list[index], "'Date:' ddd, dd MMM yyyy hh:mm:ss 'GMT'").isValid()); } -- cgit v1.2.1