Added default implementation for IEditorFactory::open().

This change allows to avoid massive code duplication along editors.

Change-Id: Ifdc6ae4b44ab399d34193ab8dddfa1f76d65ad11
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Konstantin Tokarev
2012-04-18 12:31:08 +04:00
committed by Eike Ziller
parent 6630857deb
commit ec38c829a7
25 changed files with 45 additions and 99 deletions

View File

@@ -75,12 +75,6 @@ QString PlainTextEditorFactory::displayName() const
return tr(Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME);
}
Core::IDocument *PlainTextEditorFactory::open(const QString &fileName)
{
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
return iface ? iface->document() : 0;
}
Core::IEditor *PlainTextEditorFactory::createEditor(QWidget *parent)
{
PlainTextEditorWidget *rc = new PlainTextEditorWidget(parent);