CppTools: Modernize

Change-Id: I78af9cd4ccddfa4ed744dce96b772ae5644c89d2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Nikolai Kosjar
2019-02-07 10:09:21 +01:00
parent 69281bcdcf
commit 12f4b1ee86
15 changed files with 61 additions and 96 deletions

View File

@@ -45,26 +45,26 @@ class CPPTOOLS_EXPORT CppCodeStyleSettings
public:
CppCodeStyleSettings();
bool indentBlockBraces;
bool indentBlockBody;
bool indentClassBraces;
bool indentEnumBraces;
bool indentNamespaceBraces;
bool indentNamespaceBody;
bool indentAccessSpecifiers;
bool indentDeclarationsRelativeToAccessSpecifiers;
bool indentFunctionBody;
bool indentFunctionBraces;
bool indentSwitchLabels;
bool indentStatementsRelativeToSwitchLabels;
bool indentBlocksRelativeToSwitchLabels;
bool indentControlFlowRelativeToSwitchLabels;
bool indentBlockBraces = false;
bool indentBlockBody = true;
bool indentClassBraces = false;
bool indentEnumBraces = false;
bool indentNamespaceBraces = false;
bool indentNamespaceBody = false;
bool indentAccessSpecifiers = false;
bool indentDeclarationsRelativeToAccessSpecifiers = true;
bool indentFunctionBody = true;
bool indentFunctionBraces = false;
bool indentSwitchLabels = false;
bool indentStatementsRelativeToSwitchLabels = true;
bool indentBlocksRelativeToSwitchLabels = false;
bool indentControlFlowRelativeToSwitchLabels = true;
// Formatting of pointer and reference declarations, see Overview::StarBindFlag.
bool bindStarToIdentifier;
bool bindStarToTypeName;
bool bindStarToLeftSpecifier;
bool bindStarToRightSpecifier;
bool bindStarToIdentifier = true;
bool bindStarToTypeName = false;
bool bindStarToLeftSpecifier = false;
bool bindStarToRightSpecifier = false;
// false: if (a &&
// b)
@@ -75,15 +75,15 @@ public:
// but always: while (a &&
// b)
// foo;
bool extraPaddingForConditionsIfConfusingAlign;
bool extraPaddingForConditionsIfConfusingAlign = true;
// false: a = a +
// b;
// true: a = a +
// b
bool alignAssignments;
bool alignAssignments = false;
bool preferGetterNameWithoutGetPrefix;
bool preferGetterNameWithoutGetPrefix = true;
void toSettings(const QString &category, QSettings *s) const;
void fromSettings(const QString &category, const QSettings *s);