forked from qt-creator/qt-creator
TextEditors: Move some auto-indentation code to document
From the editor widget. Also name them autoIndent/autoReindent to distinguish from the manual indent functions. Change-Id: I4e1b9d503f53870b669fee66467e5e567eacefec Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -1961,7 +1961,7 @@ bool CPPEditorWidget::handleDocumentationComment(QKeyEvent *e)
|
||||
cursor.setPosition(pos);
|
||||
cursor.insertText(comment);
|
||||
cursor.setPosition(pos - 3, QTextCursor::KeepAnchor);
|
||||
indent(document(), cursor, QChar::Null);
|
||||
baseTextDocument()->autoIndent(cursor);
|
||||
cursor.endEditBlock();
|
||||
e->accept();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user