All: Use Utils::SkipEmptyParts

Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-06-17 06:35:31 +02:00
parent 6e798401a0
commit 1c81a3b3e8
65 changed files with 236 additions and 156 deletions

View File

@@ -31,6 +31,7 @@
#include "callgrindfunction.h"
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
#include <QFileDevice>
#include <QHash>
@@ -293,11 +294,11 @@ void Parser::Private::parseHeader(QIODevice *device)
continue;
} else if (line.startsWith("positions: ")) {
QString values = getValue(line, 11);
data->setPositions(values.split(' ', QString::SkipEmptyParts));
data->setPositions(values.split(' ', Utils::SkipEmptyParts));
addressValuesCount = data->positions().count();
} else if (line.startsWith("events: ")) {
QString values = getValue(line, 8);
data->setEvents(values.split(' ', QString::SkipEmptyParts));
data->setEvents(values.split(' ', Utils::SkipEmptyParts));
costValuesCount = data->events().count();
} else if (line.startsWith("version: ")) {
QString value = getValue(line, 9);
@@ -320,7 +321,7 @@ void Parser::Private::parseHeader(QIODevice *device)
} else if (line.startsWith("summary: ")) {
QString values = getValue(line, 9);
uint i = 0;
foreach (const QStringRef &value, values.splitRef(' ', QString::SkipEmptyParts))
foreach (const QStringRef &value, values.splitRef(' ', Utils::SkipEmptyParts))
data->setTotalCost(i++, value.toULongLong());
} else if (!line.trimmed().isEmpty()) {
// handle line and exit parseHeader