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
|
||||
|
@@ -346,7 +346,9 @@ void CppCodeStylePreferencesWidget::setVisualizeWhitespace(bool on)
|
||||
|
||||
void CppCodeStylePreferencesWidget::addTab(CppCodeStyleWidget *page, QString tabName)
|
||||
{
|
||||
QTC_ASSERT(page, return);
|
||||
if (!page)
|
||||
return;
|
||||
|
||||
m_ui->categoryTab->addTab(page, tabName);
|
||||
|
||||
connect(page, &CppEditor::CppCodeStyleWidget::codeStyleSettingsChanged,
|
||||
|
Reference in New Issue
Block a user