diff --git a/.clang-format b/.clang-format index 56691f5e..7fbf4339 100644 --- a/.clang-format +++ b/.clang-format @@ -1,106 +1,35 @@ -# This is a preliminary clang-format configuration -# DON'T USE YET! ---- +BasedOnStyle: WebKit Language: Cpp -# BasedOnStyle: LLVM -AccessModifierOffset: -4 -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: false -AlignOperands: true -AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false +AlignAfterOpenBracket: true AlwaysBreakTemplateDeclarations: true -BinPackArguments: true -BinPackParameters: true -BraceWrapping: - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false -BreakBeforeBinaryOperators: NonAssignment +AllowShortFunctionsOnASingleLine: Inline BreakBeforeBraces: Linux -#BreakBeforeInheritanceComma: true -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: true -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: true -ColumnLimit: 120 +ColumnLimit: 0 CommentPragmas: '^ (FALLTHROUGH|krazy:) ' -ConstructorInitializerAllOnOneLineOrOnePerLine: true -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: false -DisableFormat: false -ExperimentalAutoDetectBinPacking: false -ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -#IncludeBlocks: Regroup +Standard: Cpp11 +IncludeBlocks: Regroup IncludeCategories: # include order: # 1. "config-kpa-xxx.h" # 2. "MAIN_HEADER.h" # 3. KPA-includes # 4. other includes - Regex: '^"(DB|Utilities|ThumbnailView|AnnotationDialog|BackgroundJobs|BackgroundTaskManager|Browser|CategoryListView|DateBar|Exif|HTMLGenerator|ImageManager|ImportExport|MainWindow|MainWindow/DuplicateMerger|Plugins|Settings|Viewer|XMLDB)/' Priority: 2 - Regex: '^(