Commit 97ce8e40 authored by Eike Ziller's avatar Eike Ziller

Remove IEditorFactor::open implementation with a warning

Looks very much like the current IDocumentFactory / IEditorFactory
set up does not make much sense. Should be cleaned up in a follow-up
commit.

Change-Id: I000b68fe6b6d75add713866818711545b41dfe23
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
parent 37c22861
......@@ -29,11 +29,12 @@
#include "ieditorfactory.h"
#include "ieditor.h"
#include "editormanager.h"
#include <utils/qtcassert.h>
Core::IDocument *Core::IEditorFactory::open(const QString &fileName)
Core::IDocument *Core::IEditorFactory::open(const QString &)
{
Core::IEditor *iface = Core::EditorManager::openEditor(fileName, id());
return iface ? iface->document() : 0;
qWarning("This should never be called, use IEditorFactor::createEditor, "
"or EditorManager::openEditor instead!");
QTC_CHECK(false);
return 0;
}
......@@ -44,7 +44,7 @@ public:
IEditorFactory(QObject *parent = 0) : IDocumentFactory(parent) {}
virtual IEditor *createEditor(QWidget *parent) = 0;
virtual IDocument *open(const QString &fileName);
virtual IDocument *open(const QString &);
};
} // namespace Core
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment