ClangFormat: Fix the "Open Used .clang-format File" function

- FilePathify related functions
- Logic of related functions were updated to use new configuration
files location and new settings variables

Change-Id: I9f5504fc72f5c051a83dc80e1feb2e13272de146
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Artem Sokolovskii
2023-01-16 12:40:41 +01:00
parent f0f0cf129a
commit a20c4c4490
3 changed files with 24 additions and 58 deletions

View File

@@ -29,8 +29,8 @@ ClangFormatSettings::Mode getProjectIndentationOrFormattingSettings(
const ProjectExplorer::Project *project);
ClangFormatSettings::Mode getCurrentIndentationOrFormattingSettings(const Utils::FilePath &filePath);
// Is the style from the matching .clang-format file or global one if it's not found.
QString configForFile(Utils::FilePath fileName);
Utils::FilePath configForFile(const Utils::FilePath &fileName);
Utils::FilePath findConfig(const Utils::FilePath &fileName);
bool getProjectOverriddenSettings(const ProjectExplorer::Project *project);