forked from qt-creator/qt-creator
TextEditor: Consolidate document access functions.
There was document(), textDocument() and baseTextDocument(). Two should be enough... Change-Id: Id9e41c8d857c5cb3269a9fce5ab594d34448c982 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -1921,7 +1921,7 @@ void FakeVimPluginPrivate::checkForElectricCharacter(bool *result, QChar c)
|
||||
if (!handler)
|
||||
return;
|
||||
if (BaseTextEditorWidget *bt = qobject_cast<BaseTextEditorWidget *>(handler->widget()))
|
||||
*result = bt->baseTextDocument()->indenter()->isElectricCharacter(c);
|
||||
*result = bt->textDocument()->indenter()->isElectricCharacter(c);
|
||||
}
|
||||
|
||||
void FakeVimPluginPrivate::handleExCommand(bool *handled, const ExCommand &cmd)
|
||||
@@ -2117,7 +2117,7 @@ void FakeVimPluginPrivate::indentRegion(int beginBlock, int endBlock,
|
||||
while (!cursor.atBlockEnd())
|
||||
cursor.deleteChar();
|
||||
} else {
|
||||
bt->baseTextDocument()->indenter()->indentBlock(doc, block, typedChar, tabSettings);
|
||||
bt->textDocument()->indenter()->indentBlock(doc, block, typedChar, tabSettings);
|
||||
}
|
||||
block = block.next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user