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

@@ -79,16 +79,6 @@ QString ProjectFilesFactory::displayName() const
return tr(Constants::FILES_EDITOR_DISPLAY_NAME);
}
Core::IDocument *ProjectFilesFactory::open(const QString &fileName)
{
Core::EditorManager *editorManager = Core::EditorManager::instance();
if (Core::IEditor *editor = editorManager->openEditor(fileName, id()))
return editor->document();
return 0;
}
////////////////////////////////////////////////////////////////////////////////////////
// ProjectFilesEditable
////////////////////////////////////////////////////////////////////////////////////////