Fix warning: "Don't call QVector::first() on temporary QList/QVector"

[-Wclazy-detaching-temporary]

Change-Id: I23f5cbd80bb92d3f9f1bfb5ae07493818958c5b0
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2019-01-17 01:54:13 +01:00
parent 3fdb5f53e3
commit f5974ad993
15 changed files with 23 additions and 21 deletions

View File

@@ -847,7 +847,8 @@ void CallgrindTool::showParserResults(const ParseData *data)
if (data->events().isEmpty()) {
msg = tr("Parsing finished, no data.");
} else {
const QString costStr = QString::fromLatin1("%1 %2").arg(QString::number(data->totalCost(0)), data->events().first());
const QString costStr = QString::fromLatin1("%1 %2")
.arg(QString::number(data->totalCost(0)), data->events().constFirst());
msg = tr("Parsing finished, total cost of %1 reported.").arg(costStr);
}
} else {