ClangFormat: Dont create a style factory to only use the indenter

Change-Id: I2bfe7c7a68341a4a11439067581f5704b1388164
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This commit is contained in:
hjk
2023-12-21 14:42:29 +01:00
parent 37c9b41273
commit 2945dc379f
6 changed files with 20 additions and 6 deletions

View File

@@ -9,6 +9,7 @@
#include <cppeditor/cppcodestylepreferences.h>
#include <cppeditor/cppcodestylepreferencesfactory.h>
#include <cppeditor/cppqtstyleindenter.h>
#include <cppeditor/cpptoolssettings.h>
#include <extensionsystem/pluginmanager.h>
@@ -122,7 +123,7 @@ bool ClangFormatIndenter::formatWhileTyping() const
ClangFormatForwardingIndenter::ClangFormatForwardingIndenter(QTextDocument *doc)
: TextEditor::Indenter(doc)
, m_clangFormatIndenter(std::make_unique<ClangFormatIndenter>(doc))
, m_cppIndenter(CppEditor::CppCodeStylePreferencesFactory().createIndenter(doc))
, m_cppIndenter(CppEditor::createCppQtStyleIndenter(doc))
{}
ClangFormatForwardingIndenter::~ClangFormatForwardingIndenter() = default;