Bug 373722

Summary: "Implement function" doesn't consider "using namespace"
Product: [Applications] kdevelop Reporter: Daniel Vrátil <dvratil>
Component: Language Support: CPP (Clang-based)Assignee: kdevelop-bugs-null
Status: CONFIRMED ---    
Severity: normal CC: martin+kde, master.haber, sjakub
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel Vrátil 2016-12-16 13:11:58 UTC
When using the "Implement function" feature in code completion in KDevelop, the generated implementation always includes namespace in the type names, even if the namespace is already specified with "using namespace" somewhere above.

It would be nice, if the tool would check for "using namespace" in the current scope and omit the namespace from the generated code.

I think this used to work in the pre-clang version, so would be nice to have it back :)
Comment 1 Ian H 2016-12-16 17:51:24 UTC
to tack on to this, if you add the namespace already to the name before the prompt comes up, it will rewrite the namespace again anyway, leaving you with foo::foo::bar instead of foo::bar.