diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-26 14:38:54 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-10-10 09:55:32 +0000 |
commit | 997c730208dfe7aead9e108df18a05cb4aaf6104 (patch) | |
tree | b0134b2a85107c282cf8404f04ae82e2ae9613d9 /src/linguist/shared/qmakeparser.cpp | |
parent | 1e51b7e92c31463fcf8e35a07ba1617ceb71347d (diff) |
qmake: eradicate Q_FOREACH loops [needing qAsConst()]
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().
Change-Id: If086bea06fe26232a7bb99fad8b09fce4dc74c27
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
(cherry picked from qtbase/e31541fa6f5f4df64fd44a9a895491c40b8c64b4)
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/linguist/shared/qmakeparser.cpp')
-rw-r--r-- | src/linguist/shared/qmakeparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linguist/shared/qmakeparser.cpp b/src/linguist/shared/qmakeparser.cpp index 874b39df1..3d5b0354d 100644 --- a/src/linguist/shared/qmakeparser.cpp +++ b/src/linguist/shared/qmakeparser.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE ProFileCache::~ProFileCache() { - foreach (const Entry &ent, parsed_files) + for (const Entry &ent : qAsConst(parsed_files)) if (ent.pro) ent.pro->deref(); } |