From 8b3350286e3acd37da26019753b06e7fbe4fcd64 Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Tue, 12 Jan 2010 12:15:06 +0100
Subject: [PATCH] Disable parts of Qt4Project::updateCodeModel that aren't used
 atm.

---
 src/plugins/qt4projectmanager/qt4project.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index 0d2d83d4822..7b929299c59 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -464,6 +464,7 @@ void Qt4Project::updateCodeModel()
     if (!modelmanager)
         return;
 
+    // Collect global headers/defines
     QStringList predefinedIncludePaths;
     QStringList predefinedFrameworkPaths;
     QByteArray predefinedMacros;
@@ -519,6 +520,9 @@ void Qt4Project::updateCodeModel()
     }
 #endif
 
+
+    // Collect per .pro file information
+    m_codeModelInfo.clear();
     foreach (Qt4ProFileNode *pro, proFiles) {
         Internal::CodeModelInfo info;
         info.defines = predefinedMacros;
@@ -557,6 +561,10 @@ void Qt4Project::updateCodeModel()
                 info.includes.append(includePath);
         }
 
+#if 0
+        // Disable for now, we need better .pro parsing first
+        // Also the information gathered here isn't used
+        // by the codemodel yet
         { // Pkg Config support
             QStringList pkgConfig = pro->variableValue(PkgConfigVar);
             if (!pkgConfig.isEmpty()) {
@@ -570,12 +578,20 @@ void Qt4Project::updateCodeModel()
                 }
             }
         }
+#endif
 
         // Add mkspec directory
         info.includes.append(activeBC->qtVersion()->mkspecPath());
 
         info.frameworkPaths = allFrameworkPaths;
 
+#if 0
+        //Disable for now, we need better .pro file parsing first, and code model
+        //support to access this information
+
+        // TODO this is wastefull
+        // only save it per .pro file, and on beeing asked
+        // search for the .pro file that has that file
         foreach (FileNode *fileNode, pro->fileNodes()) {
             const QString path = fileNode->path();
             const int type = fileNode->fileType();
@@ -583,6 +599,7 @@ void Qt4Project::updateCodeModel()
                 m_codeModelInfo.insert(path, info);
             }
         }
+#endif
     }
 
     // Add mkspec directory
-- 
GitLab