summaryrefslogtreecommitdiff
path: root/src/plugins/valgrind/callgrind
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-23 10:10:55 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-25 11:32:47 +0000
commit840e787175f0cec4714c3941c99c045a9717910d (patch)
tree763121944312cb28c53ab611932553c68cbbc08f /src/plugins/valgrind/callgrind
parent90fb7c79d8b0ec47e0ac661fd1185d11a06ba2ee (diff)
downloadqt-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.cpp2
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