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:
@@ -170,6 +170,16 @@ void BaseTextDocument::setExtraEncodingSettings(const ExtraEncodingSettings &ext
|
||||
d->m_extraEncodingSettings = extraEncodingSettings;
|
||||
}
|
||||
|
||||
void BaseTextDocument::autoIndent(const QTextCursor &cursor, QChar typedChar)
|
||||
{
|
||||
d->m_indenter->indent(d->m_document, cursor, typedChar, d->m_tabSettings);
|
||||
}
|
||||
|
||||
void BaseTextDocument::autoReindent(const QTextCursor &cursor)
|
||||
{
|
||||
d->m_indenter->reindent(d->m_document, cursor, d->m_tabSettings);
|
||||
}
|
||||
|
||||
const ExtraEncodingSettings &BaseTextDocument::extraEncodingSettings() const
|
||||
{
|
||||
return d->m_extraEncodingSettings;
|
||||
|
||||
Reference in New Issue
Block a user