Commit Graph

4 Commits

Author SHA1 Message Date
Ivan Donchevskii
f876a71fa1 ClangFormat: Improve current style detection
Check first if the current project already has .clang-format
configuration file.

Change-Id: Ic8cb5d37c32cd5b0c04485589caea95de933c264
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-13 08:38:17 +00:00
Ivan Donchevskii
cf816448ce ClangFormat: Set BreakBeforeBraces to Custom by default
If it's not set to custom some user settings are
continuously overridden which is not always expected.

Previously the default style caused some parameters
to be reset.

Change-Id: Ie0fedf6b9984116a86b7c588aed8c6b6cb35133e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-13 08:17:54 +00:00
Ivan Donchevskii
8dc566e902 CppTools: Allow to check whether project code style exists
The calling code can anyways fallback to the global style
without extra help if no project style exists.

It is useful when you want to get the project style if it exists
and understand at the same time that it is not a global one.

Change-Id: I265de3f436f90623385427fc8a1abad09c8c3577
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-12 08:56:20 +00:00
Ivan Donchevskii
0e5c7f51fa ClangFormat: Synchronize with C++ code style settings
And remove UI for default code style settings because
it does not affect anything when ClangFormat plugin is
enabled.

Change-Id: Ie348b7d2691b09ea2b4868da987f2a27347ea0f3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-11-08 14:23:06 +00:00