CppTools: Remove excess call to ProjectPart::updateLanguageFeatures

It is already called by BaseProjectPartBuilder::createProjectPart().
Besides ProjectInfo::finish() should not modify the project parts.

Change-Id: I4dc8276c94574a01432b7f98b9284e3bdf1b9f0b
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2017-01-16 10:00:10 +01:00
parent 4a26a2c283
commit 32094eeb18
2 changed files with 2 additions and 2 deletions

View File

@@ -833,6 +833,7 @@ void CppToolsPlugin::test_modelmanager_precompiled_headers()
part1->qtVersion = ProjectPart::NoQt;
part1->precompiledHeaders.append(pch1File);
part1->headerPaths = { HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath) };
part1->updateLanguageFeatures();
ProjectPart::Ptr part2(new ProjectPart);
part2->projectFile = QLatin1String("project2.projectfile");
@@ -841,6 +842,7 @@ void CppToolsPlugin::test_modelmanager_precompiled_headers()
part2->qtVersion = ProjectPart::NoQt;
part2->precompiledHeaders.append(pch2File);
part2->headerPaths = { HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath) };
part2->updateLanguageFeatures();
ProjectInfo pi = ProjectInfo(project);
pi.appendProjectPart(part1);

View File

@@ -112,8 +112,6 @@ void ProjectInfo::finish()
QSet<ProjectPartHeaderPath> uniqueHeaderPaths;
foreach (const ProjectPart::Ptr &part, m_projectParts) {
part->updateLanguageFeatures();
// Update header paths
foreach (const ProjectPartHeaderPath &headerPath, part->headerPaths) {
const int count = uniqueHeaderPaths.count();