Revision 355fc9f...

Go back to digest for 15th July 2012

Features in Development Tools

Olivier Jean de Gaalon committed changes in [kdevelop] /cpp:

Further improve auto-completion in switch statements.

Only compile-time integral constants are valid in "case ..."
statements, so filter any certainly non-constant completion items.

This has 2 issues:
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".

Signed-off-by: Olivier JG

File Changes

Modified 4 files
  • /cpp
  •   languages/codecompletion/context.cpp
  •   languages/codecompletion/context.h
  •   languages/tests/test_cppcodecompletion.cpp
  •   languages/tests/test_cppcodecompletion.h
4 files changed in total