forked from qt-creator/qt-creator
Editors: Refactor indenters out of the editors for better reusability.
Reviewed-by: ckamm
This commit is contained in:
@@ -63,13 +63,13 @@ PlainTextEditorEditable::PlainTextEditorEditable(PlainTextEditor *editor)
|
||||
PlainTextEditor::PlainTextEditor(QWidget *parent)
|
||||
: BaseTextEditor(parent),
|
||||
m_isMissingSyntaxDefinition(false),
|
||||
m_ignoreMissingSyntaxDefinition(false),
|
||||
m_indenter(new NormalIndenter) // Currently only "normal" indentation is supported.
|
||||
m_ignoreMissingSyntaxDefinition(false)
|
||||
{
|
||||
setRevisionsVisible(true);
|
||||
setMarksVisible(true);
|
||||
setRequestMarkEnabled(false);
|
||||
setLineSeparatorsAllowed(true);
|
||||
setIndenter(new NormalIndenter); // Currently only "normal" indentation is supported.
|
||||
|
||||
setMimeType(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT));
|
||||
setDisplayName(tr(Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME));
|
||||
@@ -230,11 +230,6 @@ QString PlainTextEditor::findDefinitionId(const Core::MimeType &mimeType,
|
||||
return definitionId;
|
||||
}
|
||||
|
||||
void PlainTextEditor::indentBlock(QTextDocument *doc, QTextBlock block, QChar typedChar)
|
||||
{
|
||||
m_indenter->indentBlock(doc, block, typedChar, tabSettings());
|
||||
}
|
||||
|
||||
void PlainTextEditor::acceptMissingSyntaxDefinitionInfo()
|
||||
{
|
||||
Core::ICore::instance()->showOptionsDialog(Constants::TEXT_EDITOR_SETTINGS_CATEGORY,
|
||||
|
||||
Reference in New Issue
Block a user