Bug 271083

Summary: Using operator== in enums, code-complete enum values
Product: [Applications] kdevelop Reporter: Nicolás Alvarez <nalvarez>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 4.2.1   
Target Milestone: 4.2.0   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicolás Alvarez 2011-04-16 07:29:47 UTC
enum Color { Red, Green, Blue };

void moo() {
    Color c = Red;
    if (c ==

This shows a "generic" code completion list (with local variables, etc). It should show Red, Green, Blue in the top matches.
Comment 1 Olivier.jg 2011-06-09 08:21:46 UTC
Git commit 18157909a4ce1bf631edbf80e23b437b8f5acb1d by Olivier JG.
Committed on 09/06/2011 at 08:19.
Pushed by olivierjg into branch 'master'.

Allow enum best-matches for binary operator functions
BUG: 271083

M  +2    -0    languages/cpp/codecompletion/context.cpp     
M  +22   -0    languages/cpp/tests/test_cppcodecompletion.cpp     
M  +1    -0    languages/cpp/tests/test_cppcodecompletion.h     

http://commits.kde.org/kdevelop/18157909a4ce1bf631edbf80e23b437b8f5acb1d
Comment 2 Olivier.jg 2011-06-09 08:23:46 UTC
*** Bug 271007 has been marked as a duplicate of this bug. ***