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>
This commit is contained in:
Ivan Donchevskii
2018-11-13 08:01:13 +01:00
parent 41d68f469a
commit cf816448ce

View File

@@ -116,6 +116,8 @@ Utils::FileName currentStyleConfigPath()
static clang::format::FormatStyle constructStyle(bool isGlobal)
{
FormatStyle style = getLLVMStyle();
style.BreakBeforeBraces = FormatStyle::BS_Custom;
const CppCodeStyleSettings codeStyleSettings = isGlobal
? CppCodeStyleSettings::currentGlobalCodeStyle()
: CppCodeStyleSettings::currentProjectCodeStyle()