diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-11-23 10:10:55 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-11-25 11:32:47 +0000 |
commit | 840e787175f0cec4714c3941c99c045a9717910d (patch) | |
tree | 763121944312cb28c53ab611932553c68cbbc08f /src/plugins/valgrind/callgrind | |
parent | 90fb7c79d8b0ec47e0ac661fd1185d11a06ba2ee (diff) | |
download | qt-creator-840e787175f0cec4714c3941c99c045a9717910d.tar.gz |
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>
Diffstat (limited to 'src/plugins/valgrind/callgrind')
-rw-r--r-- | src/plugins/valgrind/callgrind/callgrindparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/valgrind/callgrind/callgrindparser.cpp b/src/plugins/valgrind/callgrind/callgrindparser.cpp index 9b072ee1b4..fec9f52c5c 100644 --- a/src/plugins/valgrind/callgrind/callgrindparser.cpp +++ b/src/plugins/valgrind/callgrind/callgrindparser.cpp @@ -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 |