Version: (using KDE 4.2.0) OS: Linux Installed from: Compiled From Sources It would be nice if code completion could be invoked after a case statement, in case of enums, e.g. void test() { enum testEnum { foo, bar }; switch( testEnum ) { case <cursor> } } Now, it should offer me foo and bar.
Additionally "normal" code completion should work: switch ( someThingIDontCareAbout ) { case SomeThingIKnow::<cursor> Now it should offer me all members of SomeThingIKnow which have a type which is usable as a switch case (i.e. int, enum, ...).
This has been fixed for a while.
Hmm, this is not properly fixed for me. In the case of my inital comment, I expect "foo" and "bar" to be on the top of the completion list. Instead, I see "testEnum" on the top, which in this context doesn't make sense. I can not see "foo" or "bar" in the list, instead there is a big list of global declarations (maybe foo and bar are in there somewhere, but the list is too big to scan). The enum values should be on top of the completion list popup here.
Git commit 1e7d82145142b948cd42d0e6c035d6b33eb825e1 by Olivier JG. Committed on 06/07/2011 at 04:57. Pushed by olivierjg into branch 'master'. Create a context for switch expression, add special completion for "case" BUG: 184185 REVIEW: 101671 M +33 -1 languages/cpp/codecompletion/context.cpp M +1 -0 languages/cpp/codecompletion/context.h M +18 -0 languages/cpp/cppduchain/contextbuilder.cpp M +1 -0 languages/cpp/cppduchain/contextbuilder.h M +14 -0 languages/cpp/tests/test_cppcodecompletion.cpp M +1 -0 languages/cpp/tests/test_cppcodecompletion.h http://commits.kde.org/kdevelop/1e7d82145142b948cd42d0e6c035d6b33eb825e1