-
Suggestion
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
Qt Creator 3.0.1
-
None
Currently the coding style is fixed and might not match the one desired by the user.
The following code brings up two ways this could be improved:
void myMethod(QString const * s);
- Refactoring brings up an option to reformat to const QString * s, but the other way around might be more relevant if your coding style is to put const keywords after the type, however it is not possible. As a side note, this option is not brought up by QString const s, although one could expect it to.
- Using one of the Refactor/Add definition options will generate the following code, regardless of the coding style used in the method declaration. See Bug report 11439 on that issue.
void MyClass::myMethod(const QString * s) { }
This doesn't sound like too complicated an addition, as there are already options for coding style relative to spacing around const keywords, and the refactor option already exists.
- duplicates
-
QTCREATORBUG-19158 Unable to enforce usage of const specifier on right in generated code
-
- Closed
-
- replaces
-
QTCREATORBUG-11439 CLONE - Function header const order is changed when using Refactor / Add Definition
-
- Closed
-