Git: Eradicate Q_FOREACH loops

Change-Id: I29b6071ea244d1b3ae0701d36c90b1e93cf21fbb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2017-02-04 23:08:17 +02:00
committed by Orgad Shaneh
parent e3eee3b2b9
commit e366e135b7
17 changed files with 86 additions and 62 deletions

View File

@@ -25,6 +25,7 @@
#include <texteditor/texteditorconstants.h>
#include <utils/asconst.h>
#include <utils/qtcassert.h>
#include "githighlighters.h"
@@ -130,7 +131,7 @@ void GitRebaseHighlighter::highlightBlock(const QString &text)
return;
}
foreach (const RebaseAction &action, m_actions) {
for (const RebaseAction &action : Utils::asConst(m_actions)) {
if (action.exp.indexIn(text) != -1) {
const int len = action.exp.matchedLength();
setFormat(0, len, formatForCategory(action.formatCategory));