forked from qt-creator/qt-creator
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:
committed by
Eike Ziller
parent
6630857deb
commit
ec38c829a7
@@ -77,17 +77,6 @@ QString QmlJSEditorFactory::displayName() const
|
||||
return tr(C_QMLJSEDITOR_DISPLAY_NAME);
|
||||
}
|
||||
|
||||
|
||||
Core::IDocument *QmlJSEditorFactory::open(const QString &fileName)
|
||||
{
|
||||
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
|
||||
if (!iface) {
|
||||
qWarning() << "QmlEditorFactory::open: openEditor failed for " << fileName;
|
||||
return 0;
|
||||
}
|
||||
return iface->document();
|
||||
}
|
||||
|
||||
Core::IEditor *QmlJSEditorFactory::createEditor(QWidget *parent)
|
||||
{
|
||||
QmlJSEditor::QmlJSTextEditorWidget *rc = new QmlJSEditor::QmlJSTextEditorWidget(parent);
|
||||
|
||||
Reference in New Issue
Block a user