forked from qt-creator/qt-creator
CppEditor: Fix "testInsertAndFormatDefsFromDecls" test
Amends 240748c106.
Change-Id: I13a4eb28737636dbb5f5f5c1c7ab771a4518a701
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -7,9 +7,6 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <cppeditor/cppcodestylepreferences.h>
|
||||
#include <cppeditor/cpptoolssettings.h>
|
||||
|
||||
#include <projectexplorer/editorconfiguration.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectmanager.h>
|
||||
@@ -565,14 +562,6 @@ Utils::ChangeSet ClangFormatBaseIndenter::replacements(QByteArray buffer,
|
||||
Utils::EditOperations ClangFormatBaseIndenter::format(const TextEditor::RangesInLines &rangesInLines,
|
||||
FormattingMode mode)
|
||||
{
|
||||
bool doFormatting = mode == FormattingMode::Forced || formatCodeInsteadOfIndent();
|
||||
#ifdef WITH_TESTS
|
||||
doFormatting = doFormatting || CppEditor::CppToolsSettings::cppCodeStyle()
|
||||
->codeStyleSettings().forceFormatting;
|
||||
#endif
|
||||
if (!doFormatting)
|
||||
return {};
|
||||
|
||||
QTC_ASSERT(!m_fileName.isEmpty(), return {});
|
||||
if (rangesInLines.empty())
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user