diff options
author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2018-06-30 14:35:43 +0200 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@edeltech.ch> | 2018-06-30 22:12:28 +0000 |
commit | 2954e0112aac4d76aa8c78b3261de665621edbc6 (patch) | |
tree | b4e72edb33ea6d96e4449c9c825f985c323b270f /tests | |
parent | 699a72558d3b254e2c911b1ea6c2dbf0198d5bee (diff) | |
download | qtwebsockets-2954e0112aac4d76aa8c78b3261de665621edbc6.tar.gz |
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 <liang.qi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/websockets/handshakeresponse/tst_handshakeresponse.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <QtTest/qtestcase.h> #include <QtCore/QDebug> #include <QtCore/QByteArray> +#include <QtCore/QRegularExpression> #include <QtCore/QtEndian> #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()); } |