diff options
author | Kurt Pattyn <pattyn.kurt@gmail.com> | 2014-01-18 22:02:11 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 18:26:48 +0100 |
commit | 76cd00f8fdb249d866723ced0514041099f95a4b (patch) | |
tree | 11f9467e82926a6f62ae61c76b4e2888ab8b46bd /tests/auto | |
parent | 196617e5fb4f93655bbecea221b2dd350411fcae (diff) | |
download | qtwebsockets-76cd00f8fdb249d866723ced0514041099f95a4b.tar.gz |
Use QStringLiteral where appropriate
Change-Id: I608b555428aceafd7761a882cd4bd1fdb50d19b3
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/dataprocessor/tst_dataprocessor.cpp | 2 | ||||
-rw-r--r-- | tests/auto/handshakerequest/tst_handshakerequest.cpp | 2 | ||||
-rw-r--r-- | tests/auto/websocketframe/tst_websocketframe.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/dataprocessor/tst_dataprocessor.cpp b/tests/auto/dataprocessor/tst_dataprocessor.cpp index c4a9ed3..dc3d4fb 100644 --- a/tests/auto/dataprocessor/tst_dataprocessor.cpp +++ b/tests/auto/dataprocessor/tst_dataprocessor.cpp @@ -1725,7 +1725,7 @@ void tst_DataProcessor::invalidField(const char *dataTag, quint8 invalidFieldVal << QByteArray() << false << QWebSocketProtocol::CloseCodeProtocolError; - QTest::newRow(QString::fromLatin1(dataTag).append(" with continuation frame") + QTest::newRow(QString::fromLatin1(dataTag).append(QStringLiteral(" with continuation frame")) .toLatin1().constData()) << quint8(FIN | invalidFieldValue) << quint8(0x00) diff --git a/tests/auto/handshakerequest/tst_handshakerequest.cpp b/tests/auto/handshakerequest/tst_handshakerequest.cpp index db5ec3c..45fd5d4 100644 --- a/tests/auto/handshakerequest/tst_handshakerequest.cpp +++ b/tests/auto/handshakerequest/tst_handshakerequest.cpp @@ -162,7 +162,7 @@ void tst_HandshakeRequest::tst_invalidStream_data() QTest::newRow("Invalid http version in header") << QStringLiteral("V R HTTP/invalid"); QTest::newRow("Empty header field") << QStringLiteral("GET . HTTP/1.1\r\nHEADER: "); QTest::newRow("All zeros") << QString::fromUtf8(QByteArray(10, char(0))); - QTest::newRow("Invalid hostname") << "GET . HTTP/1.1\r\nHost: \xFF\xFF"; + QTest::newRow("Invalid hostname") << QStringLiteral("GET . HTTP/1.1\r\nHost: \xFF\xFF"); //doing extensive QStringLiteral concatenations here, because //MSVC 2010 complains when using concatenation literal strings about //concatenation of wide and narrow strings (error C2308) diff --git a/tests/auto/websocketframe/tst_websocketframe.cpp b/tests/auto/websocketframe/tst_websocketframe.cpp index c818f95..f381741 100644 --- a/tests/auto/websocketframe/tst_websocketframe.cpp +++ b/tests/auto/websocketframe/tst_websocketframe.cpp @@ -204,7 +204,7 @@ void tst_WebSocketFrame::tst_copyConstructorAndAssignment() frameHelper.setFinalFrame(true); frameHelper.setMask(1234u); frameHelper.setOpCode(QWebSocketProtocol::OpCodeBinary); - frameHelper.setPayload(QByteArray("12345")); + frameHelper.setPayload(QByteArrayLiteral("12345")); QByteArray payload = frameHelper.wireRepresentation(); QBuffer buffer(&payload); |