Code completion in KDEStudio

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Apr 11 10:31:36 UTC 2001



----------  Forwarded Message  ----------
Subject: Re: Code completion in KDEStudio
Date: Wed, 11 Apr 2001 10:58:02 +0100
From: Richard Dale <Richard_Dale at tipitina.demon.co.uk>


On Wed, 11 Apr 2001, you wrote:
> But it works. Anyway, they say so. I haven't seen it working at all, I
> don't know no version which has a working codecompletion. That's why I
> cannot build it in KDevelop-2.0, although I would like.
I just started up KDEStudio 2.0, which I got from the Kompany site a week or two
ago. It has source files: 

studio/Plugins/RTClassParser/codecompletion.h and .cpp

Here is a code extract from this method, it looks as though it fires up the
compiler to do the work to me:

 void SCodeCompletion::slotCodeCompletion()
...
  QString notMember = STUDIO_PREFIX;
  notMember += ";//";

  if ( column == 0 || !(tl->getChar(column-1) == '.' || tl->getChar(column-1) == '>') )
  {
    notMember.prepend( " this->" );
  }
  editor->pasteStr( notMember );
  editor->save();

  out = QString::null;
  runMake();

  editor->undo();
  editor->save();
  editor->doc()->setUpdatesEnabled( true );
...

And this comment from codecompletion.h:

/* For functiom parameter
class max{
public:
void ii(int k){};
void ii(char k){};
};

int main(){
max* m;
m = new max();
m->ii();
};
-------------------------------- compilator error output
A.cpp: In function `int main()':
A.cpp:10: no matching function for call to `max::ii ()'
A.cpp:3: candidates are: max::ii(int)
A.cpp:4:                 max::ii(char)
*/

/* For code completion
class max{
public:
};

int main(){
max* m;
m = new max();
m->not_member_func;
};
-------------------------------- compilator error output
B.cpp: In function `int main()':
B.cpp:8: `class max' has no member named `not_member_func'
*/

-- Richard

-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list