Bug 319060 - Code completion only considers header files in the current directory
Summary: Code completion only considers header files in the current directory
Status: RESOLVED DUPLICATE of bug 257043
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: git master
Platform: Ubuntu Linux
: NOR minor
Target Milestone: 4.3.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 11:46 UTC by Max Schwarz
Modified: 2013-04-29 11:58 UTC (History)
0 users

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


Attachments
Proposed patch (1.26 KB, patch)
2013-04-29 11:47 UTC, Max Schwarz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Schwarz 2013-04-29 11:46:33 UTC
I love KDevelop's implementation helper which shows up on ctrl + space and tells you what methods are still left to implement. But it does not show up in my work environment, which requires us to place headers and source files in different folders (include/ and src/).

The attached patch fixes the problem by disabling the "fast" parameter of CppUtils::sourceOrHeaderCandidate() during the search in CodeCompletionContext::getImplementationHelpers(). This makes it search for matching file names in the whole project, instead of just the current directory.

I do not believe this introduces performance problems. Additionally, we have used the patch for months now without any problems.

Reproducible: Always

Steps to Reproduce:
1. Create a file include/test.h with a simple class:
class Test
{
void helloWorld();
};


2. Create a file src/test.cpp and include include/test.h
3. Invoke code completion (ctrl+space).
Actual Results:  
The implementation helper will come up empty.

Expected Results:  
The implementation helper should help me implement Test::helloWorld().
Comment 1 Max Schwarz 2013-04-29 11:47:46 UTC
Created attachment 79541 [details]
Proposed patch
Comment 2 Max Schwarz 2013-04-29 11:58:34 UTC
sorry, just noticed that this is a duplicate of #257043. I'll add my patch there.

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