From e193d02a723c98bb7169267241218633913904ff Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Mon, 9 Jan 2023 13:04:24 +0100 Subject: [PATCH] ClangFormat: Fix no style for a new project Fixes: QTCREATORBUG-28655 Change-Id: I44794125cfb0e4f24dc9a573fa0f9bb29f4c2e2b Reviewed-by: Christian Kandeler --- src/plugins/clangformat/clangformatbaseindenter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp index 09606485b34..7caa8483380 100644 --- a/src/plugins/clangformat/clangformatbaseindenter.cpp +++ b/src/plugins/clangformat/clangformatbaseindenter.cpp @@ -782,7 +782,7 @@ clang::format::FormatStyle ClangFormatBaseIndenter::styleForFile() const "", &llvmFileSystemAdapter); - if (styleFromProjectFolder) { + if (styleFromProjectFolder && !(*styleFromProjectFolder == clang::format::getNoStyle())) { addQtcStatementMacros(*styleFromProjectFolder); return *styleFromProjectFolder; }