Commit cd3435a9 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Don't needlessly call updateProjectInfo()

Should not be necessary when nothing changed in the project info. This
also fixes a problem where include file scanning happened twice after
saving a pro file.

Reviewed-by: Roberto Raggi
parent fe9b4458
......@@ -331,9 +331,8 @@ void CppPreprocessor::resetEnvironment()
bool CppPreprocessor::includeFile(const QString &absoluteFilePath, QString *result)
{
if (absoluteFilePath.isEmpty() || m_included.contains(absoluteFilePath)) {
if (absoluteFilePath.isEmpty() || m_included.contains(absoluteFilePath))
return true;
}
if (m_workingCopy.contains(absoluteFilePath)) {
m_included.insert(absoluteFilePath);
......
......@@ -698,7 +698,7 @@ void Qt4Project::updateCodeModel()
pinfo.includePaths == allIncludePaths &&
pinfo.frameworkPaths == allFrameworkPaths &&
pinfo.sourceFiles == files) {
modelmanager->updateProjectInfo(pinfo);
// Nothing to update...
} else {
if (pinfo.defines != predefinedMacros ||
pinfo.includePaths != allIncludePaths ||
......
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