forked from qt-creator/qt-creator
Make the project managers tell the code model about include paths
... from the environment. Fixes: QTCREATORBUG-17985 Change-Id: I9b54e550121cfcc0684a6e173337d59d235c6107 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -405,7 +405,7 @@ void CMakeProject::updateProjectData(CMakeBuildConfiguration *bc)
|
||||
rpp.setFlagsForC({kitInfo.cToolChain, rpp.flagsForC.commandLineFlags});
|
||||
}
|
||||
|
||||
m_cppCodeModelUpdater->update({this, kitInfo, rpps});
|
||||
m_cppCodeModelUpdater->update({this, kitInfo, activeBuildEnvironment(), rpps});
|
||||
}
|
||||
{
|
||||
TraceTimer qmlCodemodelTimer(" qml codemodel");
|
||||
|
||||
@@ -311,8 +311,10 @@ static void processCMakeIncludes(const CMakeBuildTarget &cbt, const ToolChain *t
|
||||
if (!tc)
|
||||
return;
|
||||
|
||||
foreach (const HeaderPath &hp, tc->builtInHeaderPaths(flags, sysroot))
|
||||
foreach (const HeaderPath &hp, tc->builtInHeaderPaths(flags, sysroot,
|
||||
Environment::systemEnvironment())) {
|
||||
tcIncludes.insert(FilePath::fromString(hp.path));
|
||||
}
|
||||
foreach (const FilePath &i, cbt.includeFiles) {
|
||||
if (!tcIncludes.contains(i))
|
||||
includePaths.append(i.toString());
|
||||
|
||||
Reference in New Issue
Block a user