From 6702614c978e10768ac771f19d56647ca00473ab Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 4 Nov 2020 22:16:44 +0100 Subject: QStringView test: avoid narrowing Use '\0' (char) instead of 0 (int). Change-Id: I866d08e7b07ae555fcf0244a8614e3e04a0bc567 Reviewed-by: Thiago Macieira --- tests/auto/corelib/text/qstringview/tst_qstringview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/text') diff --git a/tests/auto/corelib/text/qstringview/tst_qstringview.cpp b/tests/auto/corelib/text/qstringview/tst_qstringview.cpp index c2a69c2a98..4cff432a2d 100644 --- a/tests/auto/corelib/text/qstringview/tst_qstringview.cpp +++ b/tests/auto/corelib/text/qstringview/tst_qstringview.cpp @@ -166,13 +166,13 @@ private Q_SLOTS: void fromQCharStar() const { - const QChar str[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', '!', 0 }; + const QChar str[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', '!', '\0' }; fromLiteral(str); } void fromUShortStar() const { - const ushort str[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', '!', 0 }; + const ushort str[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', '!', '\0' }; fromLiteral(str); } -- cgit v1.2.3