forked from qt-creator/qt-creator
ClangFormat: Introduce check to format code instead of indenting
Ctrl+I with the new check will reformat the selected code or the current line instead. Change-Id: Ia5a72c4a09621034d0dfe463f669fe1ca36b0b5f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "clangformatindenter.h"
|
||||
#include "clangformatsettings.h"
|
||||
#include "clangformatutils.h"
|
||||
|
||||
#include <texteditor/tabsettings.h>
|
||||
@@ -43,6 +44,11 @@ FormatStyle ClangFormatIndenter::styleForFile() const
|
||||
return ClangFormat::styleForFile(m_fileName);
|
||||
}
|
||||
|
||||
bool ClangFormatIndenter::formatCodeInsteadOfIndent() const
|
||||
{
|
||||
return ClangFormatSettings::instance().formatCodeInsteadOfIndent();
|
||||
}
|
||||
|
||||
Utils::optional<TabSettings> ClangFormatIndenter::tabSettings() const
|
||||
{
|
||||
FormatStyle style = currentProjectStyle();
|
||||
|
||||
Reference in New Issue
Block a user