forked from qt-creator/qt-creator
ClangFormat: Do not format text but indent only
Provide the separate infrastructure for the formatting but use it only when QTC_FORMAT_INSTEAD_OF_INDENT is provided in run environment. Fixes: QTCREATORBUG-21447 Fixes: QTCREATORBUG-21459 Change-Id: I1ad6fe23f5de17016c0c7b18749c6977fc03a22b Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -426,6 +426,11 @@ void TextDocument::autoReindent(const QTextCursor &cursor)
|
||||
d->m_indenter->reindent(&d->m_document, cursor, tabSettings());
|
||||
}
|
||||
|
||||
void TextDocument::autoFormat(const QTextCursor &cursor)
|
||||
{
|
||||
d->m_indenter->format(&d->m_document, cursor, tabSettings());
|
||||
}
|
||||
|
||||
QTextCursor TextDocument::indent(const QTextCursor &cursor, bool blockSelection, int column,
|
||||
int *offset)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user