Skip to content

Commit 0c3ab94

Browse files
committed
added qt things to formatter
Sorting Qt includes into their own category Q_OBJECT and Q_PROPERTY marked as whitespace sensitive macros.
1 parent 3141107 commit 0c3ab94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.clang-format

+4-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ AlignConsecutiveDeclarations: None
7878
AlwaysBreakAfterReturnType: None
7979
# BraceWrapping: [] # NOTE: For BreakBeforeBraces: Custom
8080
BreakAfterJavaFieldAnnotations: true
81-
IncludeCategories: # NOTE: order: user includes -> system includes -> standard includes
81+
IncludeCategories: # NOTE: order: user includes -> system includes -> Qt includes -> standard includes
8282
- Regex: "<[a-z_]+>"
83+
Priority: 4
84+
- Regex: "<Q[a-zA-Z_]+>"
8385
Priority: 3
8486
- Regex: "<.+>"
8587
Priority: 2
@@ -148,7 +150,7 @@ IndentCaseBlocks: false
148150
IndentExternBlock: NoIndent
149151
InsertTrailingCommas: Wrapped
150152
ObjCBreakBeforeNestedBlockParam: false
151-
WhitespaceSensitiveMacros: []
153+
WhitespaceSensitiveMacros: [Q_OBJECT, Q_PROPERTY]
152154

153155
# clang-format 12
154156
AttributeMacros: []

0 commit comments

Comments
 (0)