tracegen: fix inefficient loops

Take the loop variable by cref.

Amends 83effb3a3f6bf73e682f7a9ccedebf4073ade776.

Pick-to: 6.5
Coverity-Id: 404701
Change-Id: I1266dd1feb16b3842a93169e554a6563861f5a14
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
This commit is contained in:
Marc Mutz 2023-03-10 18:38:14 +01:00
parent 60c3aaa54f
commit 6fd163f627

View File

@ -24,7 +24,7 @@ template <typename T>
static QString aggregateListValues(int value, const QList<T> &list)
{
QStringList values;
for (auto l : list) {
for (const T &l : list) {
if (l.value == value)
values << l.name;
}