Commit Graph

7 Commits

Author SHA1 Message Date
Paul Wicking bd0943bf50 Update _clang-format definition
Add indentation for preprocessor directives if/ifdef/endif
as this is commonly used across Qt.

Change-Id: I0ce9851cc0861b8d18cb3717d695c871169db239
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-18 09:55:55 +01:00
Liang Qi bbce3228af Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	coin/provisioning/common/linux/emsdk.sh

Change-Id: I9ba6a1c52b70b605f0f856b6ce6912fd499792a3
2019-03-14 12:10:15 +01:00
Paul Wicking cc1203311a Update comment in clang-format file
Change-Id: I18f14a1956f508317f8a3995873a14bc1af29594
Reviewed-by: Andy Maloney <asmaloney@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-03-11 10:33:26 +00:00
Paul Wicking e403403b39 Update clang-format config
Set column width to 100 as described in the official Qt coding style
(https://wiki.qt.io/Qt_Coding_Style).

Also, break constructor initializers before the colon and after the commas.

Change-Id: I6ac5a21ce831a35a0d74e699192ba981c8a8ba3c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-03-08 13:53:33 +00:00
Jędrzej Nowacki e8e76d256b Fix handling of structs by clang format
Our coding style expects classes to have opening braces on a new line.
Structs and classes are the same.

Before the patch:
 struct Foo {
    ...
 };

After the patch:
 struct Foo
 {
    ...
 };

Change-Id: Ifab8a402d03ef2fd75b939f39274887feedc7b1b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-30 15:50:58 +00:00
Frederik Gladhorn 5872e22f31 _clang-format: indent initializers with four spaces, not eight
Change-Id: I9fc644554bd326a3a54163072b7b9e06253a5ff2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-08-30 09:09:28 +00:00
Frederik Gladhorn 9cd9258b8b Move _clang-format from qtrepotools
Change-Id: I9ccacaf6ed09bbc0ee3f55bf6f97d96976341d14
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-07-19 12:15:55 +00:00