[Qt-creator] Settings for naming conventions

Jochen Becher jochen_becher at gmx.de
Sat Jan 9 17:28:33 CET 2016


I would like to implement naming convention settings for QtCreator. For
many C++ element identifiers (e.g. namespace, class, attributes,
methods, getter, setters, boolean getters, local variables etc) the
user can define a naming convention build from a prefix, a name style
(e.g. lowerCamelCase, UpperCamelCase etc) and a suffix. This settings
can be defined globally and per project. A simply API allows fetching
the base name of an identifier (a list of strings building the middle
part of the identifier) or converting an identifier from one naming
convention into another.

The settings should be used in wizards, refactorings (e.g. create
setters and getters from attributes) or validating identifiers in text

I would add the new settings to the cpptools plugin but I am not sure
about the preferred design: 

1. I could extend the coding style settings which are connected to the
TextEditor by design (realization of a codiong style interface) but
naming conventions are not aligned to the TextEditor in the same manner
as coding style are.

2. I could implement a new settings class which is loosely coupled to
the cpptools plugin like e.g. the todo plugin settings.

3. Or I could implement a new settings class which is strongly coupled
to the cpptools plugin.

What do you prefer? Do you have a different preferred design in mind?

Regards, Jochen

More information about the Qt-creator mailing list