QStringView test: avoid narrowing
Use '\0' (char) instead of 0 (int). Change-Id: I866d08e7b07ae555fcf0244a8614e3e04a0bc567 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
86702fa29c
commit
6702614c97
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user