Review Request: Correctly set completion properties for enumerators

Olivier Jean de Gaalon olivier.jg at gmail.com
Thu Jul 19 11:07:55 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105616/#review16108
-----------------------------------------------------------


See kdevelop/cpp/codecompletion/item.cpp:315, it looks like it's going to override whatever you do here. Thankfully that commit also gives us some context:
"
- Implement a nice new feature: When completing for a function argument of enumeration type, show the fitting enumerations directly, and if they aren't in visible scope, show them with the necessary scope added.
- Make the public/private grouping work for enumerators.
"
So... to recap:
DUChainUtils::completionProperties probably used to do what you're making it do now.
The CPP plugin's NormalDeclarationCompletionItem has some funky code specifically to override what DUChainUtils /used/ to do, but doesn't do anymore (but that you're making it do again).

So, I don't know the reasoning for the way it is now, and I agree with your reasoning for how it should be.
If you're going to fix it, just make sure:
1. You find out what NormalDeclarationCompletionItem is trying to accomplish
2. You don't break the feature you've been working on all this time (showing matching out-of-scope enums)
3. You make sure that public/private grouping still works for enumerators
4. All tests pass

You might want to trawl through git log and history to find out WTF is going on.

- Olivier Jean de Gaalon


On July 19, 2012, 7:42 a.m., Ivan Shapovalov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105616/
> -----------------------------------------------------------
> 
> (Updated July 19, 2012, 7:42 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> EnumeratorType is rather a variable (compile-time integral constant) than an enum type-name, so mark it accordingly.
> QUESTION: although this is valid for C/C++, are there any places where an EnumeratorType would represent something different?
> 
> // this alone won't fix any bugs, there is a dependent change in queue
> 
> 
> Diffs
> -----
> 
>   language/duchain/duchainutils.cpp 1879540 
> 
> Diff: http://git.reviewboard.kde.org/r/105616/diff/
> 
> 
> Testing
> -------
> 
> Existing unit-tests pass.
> 
> 
> Thanks,
> 
> Ivan Shapovalov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120719/0f02d6c5/attachment.html>


More information about the KDevelop-devel mailing list