qmljs: Remove foreach usage

Task-number: QTCREATORBUG-27464
Change-Id: Ifdb8cf514dfe328e0a64bde1beff3e63a4b7fbc3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Artem Sokolovskii
2022-12-19 16:41:00 +01:00
parent 50ebf1f824
commit f0556b08b8
26 changed files with 138 additions and 125 deletions

View File

@@ -273,7 +273,7 @@ protected:
const int minContentLength = 10;
qreal result = badnessFromSplits;
foreach (const QString &line, lines) {
for (const QString &line : std::as_const(lines)) {
// really long lines should be avoided at all cost
if (line.size() > strongMaxLineLength) {
result += 50 + (line.size() - strongMaxLineLength);