• Nikolai Kosjar's avatar
    C++: Improve GetterSetter quick fix · f10b978f
    Nikolai Kosjar authored
    - Prefix getter name with 'get' if there is a conflict between
      the getter name and the member variable name.
    - When possible, use base name of member variable as setter parameter
      name instead of 'value'.
    - Generate static getters/setters for static members.
    - Fix case "class C { char *@s; };" - the quick fix was not offered for
      this particular cursor position (right after pointer sign).
    - Fix case "class C { char c, *@s; };" - the quick fix was done for the
      wrong type (char instead of char *).
    - Do not generate a setter for const member variables.
    - Do not get triggered on member functions and arrays.
    - Do not offer the quick fix if there is already a member with the
      getter or setter name we would generate.
    Change-Id: I4530467518ea0bf6368e47eb32d5faafbf8cd928
    Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
cppquickfix_test.cpp 16 KB