QLocale: replace use of append(QString(n, c)) with resize(size() + n, c)

Avoids a temporary QString creation.

Change-Id: Ibc87a3f1bf2979780e4a2cce7e1757f97c39a9be
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2021-12-27 10:37:44 +01:00
parent 795df9cdda
commit a6bca753c9

View File

@ -3565,7 +3565,7 @@ QString QCalendarBackend::dateTimeToString(QStringView format, const QDateTime &
}
}
if (!used)
result.append(QString(repeat, c));
result.resize(result.size() + repeat, c);
i += repeat;
}