Jump to definition doesn't work with overloaded functions

Andreas Pakulat apaku at gmx.de
Wed Feb 28 23:16:37 UTC 2007


Hi,

this is more or less for David. I found that the jump-to-definition
feature doesn't work when using it on overloaded functions. I tried in
kdevelops source code in parts/ctags2/tags.cpp in the first getMatches()
function. It contains a call to the overloaded getMatches function. 

After talking to Kris Wong a bit, it seems the code-completion is to
blame. For this particular case it would be enough if the codemodel
would know how many arguments a function takes and which ones have
default values. Probably the same for a given function call. Then the
above case where the two overloads have a different number of arguments
should be solved.

It would certainly nice if kdevelop used type information to find the
right overload so cases like

void foobar( int i1, char* c1);
void foobar( bool b1, char* c2);

would work when the code looks like

foobar(getInt(),getChar());

But Kris already told me that this would probably be too time-consuming.
Still this is something kdev4 should make possible.

Andreas

-- 
Chicken Little only has to be right once.




More information about the KDevelop-devel mailing list