Commit ec86bf8c authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

CppTools: Fix initial macro parsing for generic project

The extra macros in the config files are being read in
CppModelManager::internalDefinedMacros(), but they also affect the language
features in ProjectPart::updateLanguageFeatures().

Task-number: QTCREATORBUG-1478
Change-Id: Ic197b0b7d4cc6e6a74637da0c710b0630daae25c
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent 283069f4
......@@ -481,8 +481,6 @@ ProjectExplorer::Macros CppModelManager::internalDefinedMacros() const
for (const ProjectPart::Ptr &part : pinfo.projectParts()) {
addUnique(part->toolChainMacros, macros, alreadyIn);
addUnique(part->projectMacros, macros, alreadyIn);
if (!part->projectConfigFile.isEmpty())
macros += ProjectExplorer::Macro::toMacros(ProjectPart::readProjectConfigFile(part));
}
}
return macros;
......
......@@ -190,6 +190,8 @@ static ProjectPart::Ptr projectPartFromRawProjectPart(const RawProjectPart &rawP
part->buildTargetType = rawProjectPart.buildTargetType;
part->qtVersion = rawProjectPart.qtVersion;
part->projectMacros = rawProjectPart.projectMacros;
if (!part->projectConfigFile.isEmpty())
part->projectMacros += ProjectExplorer::Macro::toMacros(ProjectPart::readProjectConfigFile(part));
part->headerPaths = rawProjectPart.headerPaths;
part->precompiledHeaders = rawProjectPart.precompiledHeaders;
part->selectedForBuilding = rawProjectPart.selectedForBuilding;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment