Code Generation

Answered

Hi there,

There are some less important details which bother me a little bit.

When I generate constructor, setters, getters, IDE always generates names like for instance getName(). How and where can I modify some settings so it will generate get_name() ? The same problem with names of arguments.

Same question with braces. Generated function always have opening brace at the end of the line. How can I change it so it will be always in the new line ?

PS. I know this is not quite important but it annoys me every time.

0
4 comments

Hello!

You can specify prefixes for getter/setter and fields in File | Settings | Editor | Code Style | C++ | Code Generation.

To specify the brace placement, please go to File | Settings | Editor | Code Style | C++ | Wrapping and Braces| Braces placement and set In functions to Next line.

0

Thank you very much. Problem is solved.

0

Follow on question ... I don't suppose there is a way to omit the "m" from getters/setters for member vars that start with an "m"is there?

Not terribly bad to just remove the "M"s in the generated code.

0

Howa there is no such way, sorry.

0

Please sign in to leave a comment.