ClangFormat: Move the functions from clangformatutils

- Moved the functions from clangformatutils to the places where
it is belong

Change-Id: Ia4108c5b096610170e0f9d16d15d40d5538ffbdc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Artem Sokolovskii
2023-01-16 12:33:43 +01:00
parent 32d71c6da7
commit 42c3e88f95
6 changed files with 118 additions and 98 deletions

View File

@@ -18,12 +18,7 @@ namespace TextEditor { class ICodeStylePreferences; }
namespace ProjectExplorer { class Project; }
namespace ClangFormat {
// Creates the style for the current project or the global style if needed.
void createStyleFileIfNeeded(bool isGlobal);
QString currentProjectUniqueId();
std::string readFile(const QString &path);
QString projectUniqueId(ProjectExplorer::Project *project);
bool getProjectUseGlobalSettings(const ProjectExplorer::Project *project);
@@ -36,7 +31,8 @@ ClangFormatSettings::Mode getCurrentIndentationOrFormattingSettings(const Utils:
// Is the style from the matching .clang-format file or global one if it's not found.
QString configForFile(Utils::FilePath fileName);
void saveStyleToFile(clang::format::FormatStyle style, Utils::FilePath filePath);
bool getProjectOverriddenSettings(const ProjectExplorer::Project *project);
void addQtcStatementMacros(clang::format::FormatStyle &style);
clang::format::FormatStyle qtcStyle();