forked from qt-creator/qt-creator
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 <eike.ziller@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
283069f4af
commit
ec86bf8ca6
@@ -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;
|
||||
|
Reference in New Issue
Block a user