forked from qt-creator/qt-creator
ClangFormat: Start to use new file management
- Indenter uses .clang-format file from a dir of editing file or from a parent dir. If there is no such file then indenter starts to use file from a dir with the name current CodeStyle settings. - Test fixed ToDo: Add file absentness processing in case of import Change-Id: If09ef0c598899856b948c214e524bcfd5dad76e2 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -113,11 +113,8 @@ ClangFormatConfigWidget::ClangFormatConfigWidget(TextEditor::ICodeStylePreferenc
|
||||
m_ui->setupUi(this);
|
||||
setEnabled(!codeStyle->isReadOnly());
|
||||
|
||||
Utils::FilePath filePath = Core::ICore::userResourcePath();
|
||||
filePath = filePath / "clang-format/"
|
||||
/ Utils::FileUtils::fileSystemFriendlyName(codeStyle->displayName())
|
||||
/ QLatin1String(Constants::SETTINGS_FILE_NAME);
|
||||
m_config = std::make_unique<ClangFormatFile>(filePath, codeStyle->isReadOnly());
|
||||
m_config = std::make_unique<ClangFormatFile>(filePathToCurrentSettings(codeStyle),
|
||||
codeStyle->isReadOnly());
|
||||
|
||||
initChecksAndPreview();
|
||||
showCombobox();
|
||||
|
||||
Reference in New Issue
Block a user