aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/depscanner.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-09-05 15:26:36 +0200
committerJake Petroules <jake.petroules@qt.io>2016-09-05 15:51:34 +0000
commitdf038075a95cd3009d57e8c1cfae78046834d098 (patch)
tree2f282a5f713d1d6434290c828d43542bb5811eb6 /src/lib/corelib/buildgraph/depscanner.cpp
parent1856a0989a9be541ec71fb3fc9648321f4cf3844 (diff)
Handle ALL include path lists in the cpp dependency scanner
This will ensure that source files depending on header files within the search paths listed in systemIncludePaths and compilerIncludePaths will be recompiled when those headers change, as well. Change-Id: I6995fcd533b065505e3eec219294540579a73407 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/depscanner.cpp')
-rw-r--r--src/lib/corelib/buildgraph/depscanner.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/lib/corelib/buildgraph/depscanner.cpp b/src/lib/corelib/buildgraph/depscanner.cpp
index 04f5f6323..27280334c 100644
--- a/src/lib/corelib/buildgraph/depscanner.cpp
+++ b/src/lib/corelib/buildgraph/depscanner.cpp
@@ -54,14 +54,24 @@ static void collectCppIncludePaths(const QVariantMap &modules, QSet<QString> *co
QMapIterator<QString, QVariant> iterator(modules);
while (iterator.hasNext()) {
iterator.next();
+ const auto properties = iterator.value().toMap();
if (iterator.key() == QLatin1String("cpp")) {
- QVariant includePathsVariant =
- iterator.value().toMap().value(QLatin1String("includePaths"));
+ QVariant includePathsVariant = properties.value(QLatin1String("includePaths"));
if (includePathsVariant.isValid())
collectedPaths->unite(QSet<QString>::fromList(includePathsVariant.toStringList()));
+ QVariant systemIncludePathsVariant =
+ properties.value(QLatin1String("systemIncludePaths"));
+ if (systemIncludePathsVariant.isValid())
+ collectedPaths->unite(QSet<QString>::fromList(
+ systemIncludePathsVariant.toStringList()));
+ QVariant compilerIncludePathsVariant =
+ properties.value(QLatin1String("compilerIncludePaths"));
+ if (compilerIncludePathsVariant.isValid())
+ collectedPaths->unite(QSet<QString>::fromList(
+ compilerIncludePathsVariant.toStringList()));
} else {
- collectCppIncludePaths(iterator.value().toMap().value(QLatin1String("modules")).toMap(),
- collectedPaths);
+ collectCppIncludePaths(properties.value(QLatin1String("modules")).toMap(),
+ collectedPaths);
}
}
}