Editor: add formatter support

Change-Id: I65590273b2541e08a39970cd9bb4739a5634b2f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2019-11-18 10:38:35 +01:00
parent cadb00cdf3
commit 4070d6a289
14 changed files with 154 additions and 35 deletions

View File

@@ -287,7 +287,7 @@ void ClangFormatConfigWidget::updatePreview()
QTextCursor cursor(m_preview->document());
cursor.setPosition(0);
cursor.movePosition(QTextCursor::End, QTextCursor::KeepAnchor);
m_preview->textDocument()->autoFormatOrIndent(cursor);
m_preview->textDocument()->autoIndent(cursor);
}
static inline void ltrim(std::string &s)