forked from qt-creator/qt-creator
EditorFactory: Replace some virtual functions with data members
Change-Id: I014cb57460c4e3a36bf7403960908b5ffec867ff Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user