EditorFactory: Replace some virtual functions with data members

Change-Id: I014cb57460c4e3a36bf7403960908b5ffec867ff
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
hjk
2013-05-31 19:35:37 +02:00
parent be112d853a
commit b772001c82
38 changed files with 132 additions and 545 deletions

View File

@@ -43,17 +43,9 @@ namespace PythonEditor {
EditorFactory::EditorFactory(QObject *parent)
: Core::IEditorFactory(parent)
{
m_mimeTypes << QLatin1String(Constants::C_PY_MIMETYPE);
}
Core::Id EditorFactory::id() const
{
return Constants::C_PYTHONEDITOR_ID;
}
QString EditorFactory::displayName() const
{
return tr(Constants::C_EDITOR_DISPLAY_NAME);
setId(Constants::C_PYTHONEDITOR_ID);
setDisplayName(tr(Constants::C_EDITOR_DISPLAY_NAME));
addMimeType(QLatin1String(Constants::C_PY_MIMETYPE));
}
Core::IEditor *EditorFactory::createEditor(QWidget *parent)
@@ -64,9 +56,4 @@ Core::IEditor *EditorFactory::createEditor(QWidget *parent)
return widget->editor();
}
QStringList EditorFactory::mimeTypes() const
{
return m_mimeTypes;
}
} // namespace PythonEditor