Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
Qt Creator 4.5.0-beta1
-
None
-
MacOS High Sierra 10.13
-
9f6878dda (master)
Description
The coding style I use prefers const specifier on the right. So, instead of writing:
const MyClass * c;
I would write:
MyClass const * c;
The QtCreator currently does not allow specifying desired location of const specifier for generated code. Even worse, it does not even follow the original declaration when generating implementation in cpp file, which is very annoying.
For example, if I write this in my header file:
void doSomething( MyClass const & cl );
and invoke generated implementation in cpp file option, the generated code in cpp file would be
void doSomething(const MyClass & cl)
{
}
As you can see, both const specifier is on the wrong side and spaces inside braces are missing. This gets very annoying when having lots of function parameters. Can you please add those code formatting options?
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-11874 Allow user to define codestyle for const placement
-
- Closed
-