forked from qt-creator/qt-creator
Remove unneeded IEditorFactor::open re-implementations.
Change-Id: I261bc1ee09a2c22155e4874a4429a868d837c256 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
committed by
David Schulz
parent
9647ce6932
commit
d2571548f8
@@ -103,11 +103,6 @@ QString ImageViewerFactory::displayName() const
|
|||||||
return qApp->translate("OpenWith::Editors", Constants::IMAGEVIEWER_DISPLAY_NAME);
|
return qApp->translate("OpenWith::Editors", Constants::IMAGEVIEWER_DISPLAY_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IDocument *ImageViewerFactory::open(const QString & /*fileName*/)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImageViewerFactory::extensionsInitialized()
|
void ImageViewerFactory::extensionsInitialized()
|
||||||
{
|
{
|
||||||
d->actionHandler->createActions();
|
d->actionHandler->createActions();
|
||||||
|
@@ -50,7 +50,6 @@ public:
|
|||||||
QStringList mimeTypes() const;
|
QStringList mimeTypes() const;
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
Core::IDocument *open(const QString &fileName);
|
|
||||||
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
|
|
||||||
|
@@ -56,16 +56,6 @@ QString EditorFactory::displayName() const
|
|||||||
return tr(Constants::C_EDITOR_DISPLAY_NAME);
|
return tr(Constants::C_EDITOR_DISPLAY_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IDocument *EditorFactory::open(const QString &fileName)
|
|
||||||
{
|
|
||||||
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
|
|
||||||
if (!iface) {
|
|
||||||
qWarning() << "CEditorFactory::open: openEditor failed for " << fileName;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return iface->document();
|
|
||||||
}
|
|
||||||
|
|
||||||
Core::IEditor *EditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *EditorFactory::createEditor(QWidget *parent)
|
||||||
{
|
{
|
||||||
EditorWidget *widget = new EditorWidget(parent);
|
EditorWidget *widget = new EditorWidget(parent);
|
||||||
|
@@ -54,11 +54,6 @@ public:
|
|||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
|
|
||||||
/**
|
|
||||||
Opens file in new editor
|
|
||||||
*/
|
|
||||||
Core::IDocument *open(const QString &fileName);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Creates and initializes new editor widget
|
Creates and initializes new editor widget
|
||||||
*/
|
*/
|
||||||
|
@@ -61,12 +61,6 @@ QString BarDescriptorEditorFactory::displayName() const
|
|||||||
return tr("Bar descriptor editor");
|
return tr("Bar descriptor editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IDocument *BarDescriptorEditorFactory::open(const QString &fileName)
|
|
||||||
{
|
|
||||||
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
|
|
||||||
return iface ? iface->document() : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Core::IEditor *BarDescriptorEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *BarDescriptorEditorFactory::createEditor(QWidget *parent)
|
||||||
{
|
{
|
||||||
BarDescriptorEditorWidget *editorWidget = new BarDescriptorEditorWidget(parent);
|
BarDescriptorEditorWidget *editorWidget = new BarDescriptorEditorWidget(parent);
|
||||||
|
@@ -48,7 +48,6 @@ public:
|
|||||||
QStringList mimeTypes() const;
|
QStringList mimeTypes() const;
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
Core::IDocument *open(const QString &fileName);
|
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor(QWidget *parent);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user