qt code format style
2024-06-18 08:38 @学无止境 阅读(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,
}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架