aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/inputartifactscanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/corelib/buildgraph/inputartifactscanner.cpp')
-rw-r--r--src/lib/corelib/buildgraph/inputartifactscanner.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/corelib/buildgraph/inputartifactscanner.cpp b/src/lib/corelib/buildgraph/inputartifactscanner.cpp
index 68f3b744b..48722186d 100644
--- a/src/lib/corelib/buildgraph/inputartifactscanner.cpp
+++ b/src/lib/corelib/buildgraph/inputartifactscanner.cpp
@@ -77,8 +77,9 @@ static void resolveDepencency(const RawScannedDependency &dependency,
FileDependency *fileDependencyArtifact = nullptr;
Artifact *dependencyInProduct = nullptr;
Artifact *dependencyInOtherProduct = nullptr;
- for (FileResourceBase *lookupResult : project->topLevelProject()
- ->buildData->lookupFiles(absDirPath, dependency.fileName())) {
+ const auto files = project->topLevelProject()
+ ->buildData->lookupFiles(absDirPath, dependency.fileName());
+ for (FileResourceBase *lookupResult : files) {
switch (lookupResult->fileType()) {
case FileResourceBase::FileTypeDependency:
fileDependencyArtifact = static_cast<FileDependency *>(lookupResult);
@@ -274,7 +275,7 @@ void InputArtifactScanner::resolveScanResultDependencies(const Artifact *inputAr
}
// try include paths
- for (const QString &includePath : cache.searchPaths) {
+ for (const QString &includePath : qAsConst(cache.searchPaths)) {
resolveDepencency(dependency, inputArtifact->product.get(),
&resolvedDependency, includePath);
if (resolvedDependency.isValid())