[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdevelop/parts/phpsupport
From:       Amilcar do Carmo Lucas <amilcar () ida ! ing ! tu-bs ! de>
Date:       2003-07-25 7:56:32
[Download RAW message or body]

CVS commit by aclu: 

Adds a check to the method PHPSupportPart::slotActivePartChanged(KParts::Part *part).
If the file which was changed is not in the project directory it avoids parsing it.
This solves the inconsistency:
"I had an file open, which was not in the project directory. This file was not parsed
(and added to the class store), when loaded. But when I made a change to
the file, it was parsed and added (if realtime parsing is enabled)."

Patch by: Sebastian Gutweiler <sebastian in gutweiler.net>


  M +6 -0      phpsupportpart.cpp   1.46


--- kdevelop/parts/phpsupport/phpsupportpart.cpp  #1.45:1.46
@@ -158,4 +158,10 @@ void PHPSupportPart::slotTextChanged(){
   int numLines = m_editInterface->numLines();
 
+  //Abort if the file which was changed is not part of the project
+  if (!project()->allFiles().contains(fileName.mid ( project()->projectDirectory().length() + 1 ))) {
+    kdDebug(9018) << "Not Parsing file " << fileName << ", file is not part of the project" << endl;
+    return;
+  }
+
   QStringList lines;
   for(int i=0;i<numLines;i++){


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic