OSDN Git Service

Don't needlessly call updateProjectInfo()
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Mon, 26 Oct 2009 14:31:43 +0000 (15:31 +0100)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Mon, 26 Oct 2009 14:34:12 +0000 (15:34 +0100)
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
src/plugins/cpptools/cppmodelmanager.cpp
src/plugins/qt4projectmanager/qt4project.cpp

index 1d88692..75f8f74 100644 (file)
@@ -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);
index c58793b..96c0800 100644 (file)
@@ -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     ||