aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git/gitgrep.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2017-02-04 23:08:17 +0200
committerOrgad Shaneh <orgads@gmail.com>2017-02-06 09:37:44 +0000
commite366e135b7f23e6a7bcd55cf6f859164a735b21d (patch)
tree0f3ac554a4e6af1f079a83a4dec34ae8257bade5 /src/plugins/git/gitgrep.cpp
parente3eee3b2b9c80fb989503f51a1072df2949deb68 (diff)
Git: Eradicate Q_FOREACH loops
Change-Id: I29b6071ea244d1b3ae0701d36c90b1e93cf21fbb Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/git/gitgrep.cpp')
-rw-r--r--src/plugins/git/gitgrep.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/git/gitgrep.cpp b/src/plugins/git/gitgrep.cpp
index 8bb26b244ea..529921fb3f1 100644
--- a/src/plugins/git/gitgrep.cpp
+++ b/src/plugins/git/gitgrep.cpp
@@ -35,6 +35,7 @@
#include <vcsbase/vcscommand.h>
#include <vcsbase/vcsbaseconstants.h>
+#include <utils/asconst.h>
#include <utils/fancylineedit.h>
#include <utils/filesearch.h>
#include <utils/fileutils.h>
@@ -119,7 +120,7 @@ public:
QRegularExpressionMatch regexpMatch = regexp.match(line);
single.regexpCapturedTexts = regexpMatch.capturedTexts();
}
- foreach (auto match, matches) {
+ for (auto match : Utils::asConst(matches)) {
single.matchStart = match.first;
single.matchLength = match.second;
resultList->append(single);