[PATCH] Patch adding a check in the textChanged slot of the PHP part
Amilcar do Carmo Lucas
amilcar at ida.ing.tu-bs.de
Fri Jul 25 09:58:04 UTC 2003
Applied! Thanks a lot
Sebastian Gutweiler wrote:
>Hi,
>
>when using the PHP part I noticed a strange behaviour: 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).
>This patch adds a check to the method
>PHPSupportPart::slotActivePartChanged(KParts::Part *part). If the file
>which was changed is not in the project directory it aborts.
>
>Sebastian
>
>
>------------------------------------------------------------------------
>
>diff -u --recursive --new-file kdevelop_orig/parts/phpsupport/phpsupportpart.cpp kdevelop_change/parts/phpsupport/phpsupportpart.cpp
>--- kdevelop_orig/parts/phpsupport/phpsupportpart.cpp Tue Jul 15 22:39:52 2003
>+++ kdevelop_change/parts/phpsupport/phpsupportpart.cpp Thu Jul 24 19:44:30 2003
>@@ -157,6 +157,14 @@
> kdDebug(9018) << "filename:" << fileName << endl;
> 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++){
> lines.append(m_editInterface->textLine(i));
>
>
--
Amilcar Lucas
More information about the KDevelop-devel
mailing list