forked from qt-creator/qt-creator
Use QString::splitRef() instead of QString::split()
Avoid string allocation where it seems feasible. Change-Id: I61b23d4ef8a459f5aa77727a75f4e1d2b140da3b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -327,7 +327,7 @@ void Parser::Private::parseHeader(QIODevice *device)
|
||||
} else if (line.startsWith("summary: ")) {
|
||||
QString values = getValue(line, 9);
|
||||
uint i = 0;
|
||||
foreach (const QString &value, values.split(QLatin1Char(' '), QString::SkipEmptyParts))
|
||||
foreach (const QStringRef &value, values.splitRef(QLatin1Char(' '), QString::SkipEmptyParts))
|
||||
data->setTotalCost(i++, value.toULongLong());
|
||||
} else if (!line.trimmed().isEmpty()) {
|
||||
// handle line and exit parseHeader
|
||||
|
||||
Reference in New Issue
Block a user