Bug 78255

Summary: kdevelop parser gets confused by comments in cpp sources
Product: [Applications] kdevelop Reporter: Holger Schröder <holger-kde>
Component: Code completionAssignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 3.0.2   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Holger Schröder 2004-03-22 20:43:14 UTC
Version:           3.0.2 (using KDE 3.2.1, Gentoo)
Compiler:          gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)
OS:          Linux (i686) release 2.6.3-gentoo

Hi,

when you have a class in kdevelop 3.0.2, which contains these lines:

	QString tmp;
	tmp.
	// lala....
	tmp.

then pressing ctrl-space at the first "tmp." works and the code completion is offered, but when pressing ctrl-space at the second "tmp." it doesnt work. adding a ; after lala.... helps. so probably the parser ( or whatever is responsible for this ) does not ignore comments properly.

thanks, Holger
Comment 1 John Birch 2004-03-23 08:42:28 UTC
Well
  classInst.
  methodName();
is valid syntax.

So in your case
  QString tmp;
  tmp.
  tmp.<ctrl><space>
I would expect the code completion to be looking for tmp.tmp.
which it would never find as there's no tmp var on a QString. Hence no code completion can be offered with or without a comment in between.

However - you are right - this is a bug. The following 
  QHBoxLayout *top_layout = new QHBoxLayout(this);   
  top_layout->
  // lala ....
  widget()-><ctrl><space>
doesn't work whereas

  top_layout->
  widget()-><ctrl><space>
will work.

Not quite the same you were reporting though :-)
Comment 2 Adam Treat 2005-03-09 06:00:15 UTC

*** This bug has been marked as a duplicate of 72692 ***