Use (new) QStringIterator(QStringView) to avoid casts
This is the only one in QtBase that casts to be able to use QStringIterator.
Amends d40dcee642.
Change-Id: I709e0285717e8d17feab9ab0020c8d0aed0dbe36
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
bb10
parent
8a6b20eb0e
commit
a8c046a2a3
|
|
@ -1596,7 +1596,7 @@ int QString::toUcs4_helper(const ushort *uc, int length, uint *out)
|
|||
{
|
||||
int count = 0;
|
||||
|
||||
QStringIterator i(reinterpret_cast<const QChar *>(uc), reinterpret_cast<const QChar *>(uc + length));
|
||||
QStringIterator i(QStringView(uc, length));
|
||||
while (i.hasNext())
|
||||
out[count++] = i.next();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue