QString::fill: port to char16_t

Change-Id: If91ea7b7ceedbf9ed109b064ea5ea5572e7c9b14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Anton Kudryavtsev 2023-10-31 11:14:21 +03:00
parent ebbd9ddf88
commit f331171dd7

View File

@ -6225,11 +6225,8 @@ void QString::chop(qsizetype n)
QString& QString::fill(QChar ch, qsizetype size)
{
resize(size < 0 ? d.size : size);
if (d.size) {
QChar *i = (QChar*)d.data() + d.size;
QChar *b = (QChar*)d.data();
std::fill(b, i, ch);
}
if (d.size)
std::fill(d.data(), d.data() + d.size, ch.unicode());
return *this;
}