summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/compileroptionsbuilder.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2021-02-15 10:03:57 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2021-02-17 14:43:29 +0000
commit72d91dc94af1861c4374dab5698859149b21dbfd (patch)
tree3e51016b44c6a4db35fba150579e033bbdf2a274 /src/plugins/cpptools/compileroptionsbuilder.cpp
parent1d27f894bb8454693ff5fc5979dda0d9090dc7a8 (diff)
downloadqt-creator-72d91dc94af1861c4374dab5698859149b21dbfd.tar.gz
Use qAsConst with non-const Qt containers in range-loops
... in various places Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
-rw-r--r--src/plugins/cpptools/compileroptionsbuilder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp
index 37d64208b1..b40d6e1ac8 100644
--- a/src/plugins/cpptools/compileroptionsbuilder.cpp
+++ b/src/plugins/cpptools/compileroptionsbuilder.cpp
@@ -343,9 +343,9 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
using ProjectExplorer::HeaderPath;
using ProjectExplorer::HeaderPathType;
- for (const HeaderPath &headerPath : filter.userHeaderPaths)
+ for (const HeaderPath &headerPath : qAsConst(filter.userHeaderPaths))
addIncludeDirOptionForPath(headerPath);
- for (const HeaderPath &headerPath : filter.systemHeaderPaths)
+ for (const HeaderPath &headerPath : qAsConst(filter.systemHeaderPaths))
addIncludeDirOptionForPath(headerPath);
if (m_useTweakedHeaderPaths != UseTweakedHeaderPaths::No) {
@@ -356,7 +356,7 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
m_options.prepend("-nostdinc++");
m_options.prepend("-nostdinc");
- for (const HeaderPath &headerPath : filter.builtInHeaderPaths)
+ for (const HeaderPath &headerPath : qAsConst(filter.builtInHeaderPaths))
addIncludeDirOptionForPath(headerPath);
}
}