texteditor: merge ITextEditable into ITextEditor

rename BastTextEditor->BaseTextEditorWidget, BaseTextEditorEditable->BaseTextEditor
rename BaseTextEditor{,Widget} subclasses
rename editableInterface->editorInterface
rename createEditableInterface->createEditor
minor cleanups after renamings
This commit is contained in:
hjk
2011-02-21 16:02:26 +01:00
parent e32cf192f7
commit f576ad9f2c
180 changed files with 1326 additions and 1382 deletions

View File

@@ -204,7 +204,7 @@ void TextEditorPlugin::extensionsInitialized()
this, SLOT(updateCurrentSelection(QString)));
}
void TextEditorPlugin::initializeEditor(PlainTextEditor *editor)
void TextEditorPlugin::initializeEditor(PlainTextEditorWidget *editor)
{
// common actions
m_editorFactory->actionHandler()->setupActions(editor);
@@ -271,7 +271,7 @@ void TextEditorPlugin::updateVariable(const QString &variable)
void TextEditorPlugin::updateCurrentSelection(const QString &text)
{
Core::IEditor *iface = Core::EditorManager::instance()->currentEditor();
ITextEditable *editor = qobject_cast<ITextEditable *>(iface);
ITextEditor *editor = qobject_cast<ITextEditor *>(iface);
if (editor) {
int pos = editor->position();
int anchor = editor->position(ITextEditor::Anchor);
@@ -281,7 +281,7 @@ void TextEditorPlugin::updateCurrentSelection(const QString &text)
if (selectionLength == 0)
return;
int start = qMin(pos, anchor);
editor->setCurPos(start);
editor->setCursorPosition(start);
editor->replace(selectionLength, text);
}
}