• Przemyslaw Gorszkowski's avatar
    C++: display enum value in tooltip for simplest case · 9e159d87
    Przemyslaw Gorszkowski authored
    
    
    If it is possible lets calculate enum value for the simplest case.
    Example where it works:
    enum
    {
      enum_val1, // tooltip = "enum_val1 = 0"
      enum_val2 // tooltip = "enum_val2 = 1"
    };
    
    enum
    {
      enum_val1=10, // tooltip = "enum_val1 = 10"
      enum_val2 // tooltip = "enum_val2 = 11"
    };
    
    enum
    {
      enum_val1, // tooltip = "enum_val1 = 0"
      enum_val2=10, // tooltip = "enum_val2 = 10"
      enum_val3 // tooltip = "enum_val3 = 11"
    };
    
    Example where it does not work:
    enum
    {
      enum_val1=10+1, // tooltip = "enum_val1 = 10+1"
      enum_val2 // tooltip = "enum_val2"
    };
    
    Task-number: QTCREATORBUG-4529
    Change-Id: Idd85ed7304018f73f2b068bf1ac28f1abde02f93
    Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
    Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
    9e159d87
cppelementevaluator.cpp 16.7 KB