forked from qt-creator/qt-creator
ClangFormat: Remove unneeded warning
- Remove warning when .clang-format file is absent - Remove warning when a page is nullptr in addTab function Change-Id: I4232bc77eaac56c78707fc37aaf75b00b8af9006 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -739,6 +739,9 @@ clang::format::FormatStyle ClangFormatBaseIndenter::styleForFile() const
|
||||
Utils::FilePath filePath = filePathToCurrentSettings(
|
||||
TextEditor::TextEditorSettings::codeStyle("Cpp")->currentPreferences());
|
||||
|
||||
if (!filePath.exists())
|
||||
return qtcStyle();
|
||||
|
||||
clang::format::FormatStyle style;
|
||||
style.Language = clang::format::FormatStyle::LK_Cpp;
|
||||
const std::error_code error
|
||||
|
||||
Reference in New Issue
Block a user