Editors: Continue refactoring indenters out of the editors.

This is pretty much a complement of commit 3a684586fa,
which is an attempt to make editors and indenters a bit more decoupled.

Reviewed-by: Thorbjorn Lindeijer
This commit is contained in:
Leandro Melo
2010-11-09 10:36:02 +01:00
parent 36fa1de4c6
commit c8a53a66ad
5 changed files with 33 additions and 30 deletions

View File

@@ -58,6 +58,7 @@
#include <texteditor/texteditorconstants.h>
#include <texteditor/tabsettings.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/indenter.h>
#include <find/findplugin.h>
#include <find/textfindconstants.h>
@@ -935,7 +936,7 @@ void FakeVimPluginPrivate::checkForElectricCharacter(bool *result, QChar c)
if (!handler)
return;
if (BaseTextEditor *bt = qobject_cast<BaseTextEditor *>(handler->widget()))
*result = bt->isElectricCharacter(c);
*result = bt->indenter()->isElectricCharacter(c);
}
void FakeVimPluginPrivate::handleExCommand(bool *handled, const ExCommand &cmd)
@@ -1132,7 +1133,7 @@ void FakeVimPluginPrivate::indentRegion(int beginLine, int endLine,
while (!cursor.atBlockEnd())
cursor.deleteChar();
} else {
bt->indentBlock(doc, block, typedChar);
bt->indenter()->indentBlock(doc, block, typedChar, bt);
}
block = block.next();
}