diff --git a/src/plugins/clangformat/CMakeLists.txt b/src/plugins/clangformat/CMakeLists.txt index 61ebc03c421..9a0d230315b 100644 --- a/src/plugins/clangformat/CMakeLists.txt +++ b/src/plugins/clangformat/CMakeLists.txt @@ -13,6 +13,8 @@ add_qtc_plugin(ClangFormat clangformatplugin.cpp clangformatplugin.h clangformatsettings.cpp clangformatsettings.h clangformatutils.cpp clangformatutils.h + EXPLICIT_MOC + clangformatconfigwidget.cpp clangformatconfigwidget.h ) if(TARGET ClangFormat) diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp index 230078558e5..973c1050772 100644 --- a/src/plugins/clangformat/clangformatutils.cpp +++ b/src/plugins/clangformat/clangformatutils.cpp @@ -118,7 +118,9 @@ clang::format::FormatStyle qtcStyle() style.ColumnLimit = 100; style.CommentPragmas = "^ IWYU pragma:"; style.CompactNamespaces = false; +#if LLVM_VERSION_MAJOR < 15 style.ConstructorInitializerAllOnOneLineOrOnePerLine = false; +#endif style.ConstructorInitializerIndentWidth = 4; style.ContinuationIndentWidth = 4; style.Cpp11BracedListStyle = true;