Bug 78255 - kdevelop parser gets confused by comments in cpp sources
Summary: kdevelop parser gets confused by comments in cpp sources
Status: RESOLVED DUPLICATE of bug 72692
Alias: None
Product: kdevelop
Classification: Applications
Component: Code completion (show other bugs)
Version: 3.0.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-22 20:43 UTC by Holger Schröder
Modified: 2005-03-09 06:00 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 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 ***