forked from qt-creator/qt-creator
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: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -29,11 +29,12 @@
|
|||||||
|
|
||||||
#include "ieditorfactory.h"
|
#include "ieditorfactory.h"
|
||||||
|
|
||||||
#include "ieditor.h"
|
#include <utils/qtcassert.h>
|
||||||
#include "editormanager.h"
|
|
||||||
|
|
||||||
Core::IDocument *Core::IEditorFactory::open(const QString &fileName)
|
Core::IDocument *Core::IEditorFactory::open(const QString &)
|
||||||
{
|
{
|
||||||
Core::IEditor *iface = Core::EditorManager::openEditor(fileName, id());
|
qWarning("This should never be called, use IEditorFactor::createEditor, "
|
||||||
return iface ? iface->document() : 0;
|
"or EditorManager::openEditor instead!");
|
||||||
|
QTC_CHECK(false);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
IEditorFactory(QObject *parent = 0) : IDocumentFactory(parent) {}
|
IEditorFactory(QObject *parent = 0) : IDocumentFactory(parent) {}
|
||||||
|
|
||||||
virtual IEditor *createEditor(QWidget *parent) = 0;
|
virtual IEditor *createEditor(QWidget *parent) = 0;
|
||||||
virtual IDocument *open(const QString &fileName);
|
virtual IDocument *open(const QString &);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|||||||
Reference in New Issue
Block a user