Valgrind: Fix callgrind parsing with git version

Commit db860c7cdce8765f8c4ec28127860c8e97ba34ab added a format marker to
the file. First line is now: `# callgrind format`

Task-number: QTCREATORBUG-19004
Change-Id: I2f6ed81044fa0d675a02b9634d8ee8e3ea1da6e5
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2017-11-16 21:59:18 +02:00
committed by Orgad Shaneh
parent c1d3e22511
commit a02ee529ef

View File

@@ -298,7 +298,9 @@ void Parser::Private::parseHeader(QIODevice *device)
// now that we're done checking if we're done (heh) with the header, parse the address // now that we're done checking if we're done (heh) with the header, parse the address
// and cost column descriptions. speed is unimportant here. // and cost column descriptions. speed is unimportant here.
if (line.startsWith("positions: ")) { if (line.startsWith('#')) {
continue;
} else if (line.startsWith("positions: ")) {
QString values = getValue(line, 11); QString values = getValue(line, 11);
data->setPositions(values.split(QLatin1Char(' '), QString::SkipEmptyParts)); data->setPositions(values.split(QLatin1Char(' '), QString::SkipEmptyParts));
addressValuesCount = data->positions().count(); addressValuesCount = data->positions().count();