Bug 118914 - Doesn't parse PHP class methods which returns references (those with ampersand)
Summary: Doesn't parse PHP class methods which returns references (those with ampersand)
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Unmaintained
Component: general (show other bugs)
Version: 3.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-23 19:06 UTC by Marte Soliza
Modified: 2006-01-17 14:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marte Soliza 2005-12-23 19:06:01 UTC
Version:           3.5 (using KDE 3.5.0, Kubuntu Package 4:3.5.0-0ubuntu0breezy1 breezy)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.12-10-386

I have a class defined like this:
class A {

  var $obj;

  function A (&$obj)  {
    $this->obj =& $obj;
  }

  function &get () {
    return $this->obj;
  }

  function set (&$obj) {
    $this->obj =& $obj;
  }

}

When I create an instance:
$a = new A();
$a->(have a tooltip for method A::set(), but not A::get())

When I remove the ampersand in A::get(), it shows the methods correctly.
Comment 1 András Manţia 2006-01-17 14:12:07 UTC
SVN commit 499280 by amantia:

Recognize PHP functions which returns references.

BUG: 118914

 M  +1 -0      ChangeLog  
 M  +1 -1      data/dtep/php/description.rc  
 M  +7 -7      src/document.cpp  


--- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #499279:499280
@@ -12,6 +12,7 @@
         - don't have two Close actions [#118448]
         - don't show CSS pseudo-classes in autocompletion for the class attribute [#119373]
         - avoid deadlock when loading the DTEPs
+        - recognize PHP functions which returns references [#118914]
 
  - improvements:
         - add XHTML 1.1 and XHTML 1.0 Basic to the quickstart dialog [#118813]
--- branches/KDE/3.5/kdewebdev/quanta/data/dtep/php/description.rc #499279:499280
@@ -54,7 +54,7 @@
 Name = Functions
 No_Name = No Functions
 Icon = mini-modules
-DefinitionRx = \bfunction[\\s]+([0-9a-zA-Z_\x7f-\xff]*[\\s]*(?:\(.*\)){0,1})
+DefinitionRx = \bfunction[\\s]+&?([0-9a-zA-Z_\x7f-\xff]*[\\s]*(?:\(.*\)){0,1})
 AppendToTags = true
 ParentGroup = Classes
 
--- branches/KDE/3.5/kdewebdev/quanta/src/document.cpp #499279:499280
@@ -1098,8 +1098,8 @@
       {
         if (elementList[i]->parentNode == 0L || elementList[i]->global)
         {
-          completion.text = it.key().section('|', -1);
-          completions->append( completion );
+          completion.text = it.key().section('|', -1).stripWhiteSpace();
+          completions->append(completion);
           break;
         } else
         {
@@ -1110,8 +1110,8 @@
           }
           if (n == elementList[i]->parentNode)
           {
-            completion.text = it.key().section('|', -1);
-            completions->append( completion );
+            completion.text = it.key().section('|', -1).stripWhiteSpace();
+            completions->append(completion);
             break;
           }
         }
@@ -1128,8 +1128,8 @@
     {
       if (list[i].startsWith(word) && list[i] != word)
       {
-        completion.text = list[i];
-        completions->append( completion );
+        completion.text = list[i].stripWhiteSpace();
+        completions->append(completion);
       }
     }
   }
@@ -1300,7 +1300,7 @@
       completion.text = QuantaCommon::tagCase(tagNameList[i]);
     else
       completion.text = tagNameList[i];
-    completion.text = completion.text.left(completion.text.length() - 10);
+    completion.text = completion.text.left(completion.text.length() - 10).stripWhiteSpace();
     completion.comment = comments[tagNameList[i]];
     completions->append( completion );
   }