From 76cd00f8fdb249d866723ced0514041099f95a4b Mon Sep 17 00:00:00 2001 From: Kurt Pattyn Date: Sat, 18 Jan 2014 22:02:11 +0100 Subject: Use QStringLiteral where appropriate Change-Id: I608b555428aceafd7761a882cd4bd1fdb50d19b3 Reviewed-by: Richard J. Moore --- tests/auto/dataprocessor/tst_dataprocessor.cpp | 2 +- tests/auto/handshakerequest/tst_handshakerequest.cpp | 2 +- tests/auto/websocketframe/tst_websocketframe.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto') 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); -- cgit v1.2.3