代码改变世界

qt code format style

  @学无止境  阅读(12)  评论(0编辑  收藏  举报

参考:https://www.cnblogs.com/ybqjymy/p/18003463 

帮助-->关于插件

 

把clang-format.exe 放在D:\Q5.15\Tools\QtCreator\bin\clang\bin目录下

 

 

{
BasedOnStyle: Google,
AccessModifierOffset: -2,
AlignAfterOpenBracket: Align,
AlignConsecutiveAssignments: false,
AlignConsecutiveDeclarations: false,
AlignEscapedNewlines: DontAlign,
AlignOperands: true,
AllowAllParametersOfDeclarationOnNextLine: true,
AllowShortBlocksOnASingleLine: true,
AllowShortCaseLabelsOnASingleLine: true,
AllowShortFunctionsOnASingleLine: Empty,
AllowShortIfStatementsOnASingleLine: false,
AllowShortLoopsOnASingleLine: false,
AlwaysBreakAfterDefinitionReturnType: None,
AlwaysBreakAfterReturnType: None,
AlwaysBreakBeforeMultilineStrings: false,
AlwaysBreakTemplateDeclarations: true,
AlwaysBreakAfterDefinitionReturnType: None,
AlwaysBreakAfterReturnType: None,
AlwaysBreakBeforeMultilineStrings: false,
AlwaysBreakTemplateDeclarations: true,
BinPackArguments: true,
BinPackParameters: true,
BreakBeforeBinaryOperators: None,
BreakBeforeBraces: Attach,
BreakBeforeTernaryOperators: false,
BreakConstructorInitializers: BeforeComma,
BreakStringLiterals: true,
ColumnLimit: 120,
CommentPragmas: '^ IWYU pragma:',
CompactNamespaces: false,
ConstructorInitializerAllOnOneLineOrOnePerLine: false,
ConstructorInitializerIndentWidth: 4,
ContinuationIndentWidth: 4,
Cpp11BracedListStyle: true,
DerivePointerAlignment: false,
DisableFormat: false,
ExperimentalAutoDetectBinPacking: false,
FixNamespaceComments: true,
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ],
IncludeBlocks: Regroup,
IndentCaseLabels: true,
IndentPPDirectives: AfterHash,
IndentWidth: 4,
IndentWrappedFunctionNames: true,
KeepEmptyLinesAtTheStartOfBlocks: false,
MacroBlockBegin: '',
MacroBlockEnd: '',
MaxEmptyLinesToKeep: 1,
NamespaceIndentation: All,
ObjCBlockIndentWidth: 4,
ObjCSpaceAfterProperty: false,
ObjCSpaceBeforeProtocolList: true,
PenaltyBreakBeforeFirstCallParameter: 19,
PenaltyBreakComment: 300,
PenaltyBreakFirstLessLess: 120,
PenaltyBreakString: 1000,
PenaltyExcessCharacter: 1000000,
PenaltyReturnTypeOnItsOwnLine: 60,
PointerAlignment: Left,
ReflowComments: true,
SortIncludes: true,
SpaceAfterCStyleCast: false,
SpaceAfterTemplateKeyword: true,
SpaceBeforeAssignmentOperators: true,
SpaceBeforeParens: ControlStatements,
SpaceInEmptyParentheses: false,
SpacesBeforeTrailingComments: 2,
SpacesInAngles: false,
SpacesInContainerLiterals: false,
SpacesInCStyleCastParentheses: false,
SpacesInParentheses: false,
SpacesInSquareBrackets: false,
TabWidth: 4,
UseTab: Never,
}

相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
点击右上角即可分享
微信分享提示