cleanup: replace Q_FOREACH by range-based for in profile code

With Qt-containers, this might be a small pessimization, because
it might lead to a deep copy. This can be "fixed" by
   for (const Type &item: qAsConst(container))
But frankly, I don't care. Ultimately it is probably best to
replace the Qt containers by standard containers.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2023-02-15 09:56:18 +01:00 committed by Dirk Hohndel
parent 4128fec1ea
commit 3f2e4e8b16
3 changed files with 8 additions and 11 deletions

View file

@ -826,7 +826,7 @@ void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphics
QPolygonF poly;
painter->setPen(QPen(alertColor, pWidth));
Q_FOREACH (const QPolygonF &poly, alertPolygons)
for (const QPolygonF &poly: alertPolygons)
painter->drawPolyline(poly);
painter->restore();
}