Review Request: Further improve auto-completion in switch statements.
Olivier Jean de Gaalon
olivier.jg at gmail.com
Sat Jul 14 01:26:07 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105561/#review15830
-----------------------------------------------------------
Looks pretty good to me. Just get rid of trailing whitespace and see comments...
languages/cpp/codecompletion/context.cpp
<http://git.reviewboard.kde.org/r/105561/#comment12505>
bool isIntegralConstant(Declaration *decl) {/*Move the ShowIntegralConstants switch over here*/}
languages/cpp/codecompletion/context.cpp
<http://git.reviewboard.kde.org/r/105561/#comment12506>
Test to validate this behavior?
Q_EXPECT_FAIL on hiding non-constexpr.
Test that constexpr type is shown.
- Olivier Jean de Gaalon
On July 13, 2012, 8:38 p.m., Ivan Shapovalov wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105561/
> -----------------------------------------------------------
>
> (Updated July 13, 2012, 8:38 p.m.)
>
>
> Review request for KDevelop and Olivier Jean de Gaalon.
>
>
> Description
> -------
>
> Only compile-time integral constants are valid in "case ..."
> statements, so filter any certainly non-constant completion items.
>
> This has 2 usability issues (well, not issues, but questionable points):
> 1) We do not filter type-names since they can be used either as scopes
> (SomeType::someConstant) or as ctor-like initializers
> (SomeIntegralTypedef(42)).
> 2) We do not filter integer-returning functions since they
> can be constexpr (thus syntactically usable) but we cannot handle
> constexpr now.
>
> But, since one rarely would use these items, their match quality
> is forced to zero in order to avoid pollution of "best matches".
>
>
> Diffs
> -----
>
> languages/cpp/codecompletion/context.h e17fe7c
> languages/cpp/codecompletion/context.cpp 34bc728
> languages/cpp/tests/test_cppcodecompletion.cpp eb44618
>
> Diff: http://git.reviewboard.kde.org/r/105561/diff/
>
>
> Testing
> -------
>
> Unit-tests have been made aware of the newly-introduced filtering; usability has been discussed with Olivier Jean de Gaalon.
>
>
> Thanks,
>
> Ivan Shapovalov
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120714/9453bfd5/attachment.html>
More information about the KDevelop-devel
mailing list