Commit a952a9bf authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Rename CppPluginEditorFactory to CppEditorFactory

I couldn't find it since it was both hidden in the cppplugin.cpp file as
well as having an unnecessarily long name.
parent 0694e3af
......@@ -60,9 +60,9 @@ static const char *sourceSuffixKeyC = "CppEditor/SourceSuffix";
using namespace CppEditor::Internal;
//////////////////////////// CppPluginEditorFactory /////////////////////////////
//////////////////////////// CppEditorFactory /////////////////////////////
CppPluginEditorFactory::CppPluginEditorFactory(CppPlugin *owner) :
CppEditorFactory::CppEditorFactory(CppPlugin *owner) :
m_kind(QLatin1String(CppEditor::Constants::CPPEDITOR_KIND)),
m_owner(owner)
{
......@@ -77,18 +77,18 @@ CppPluginEditorFactory::CppPluginEditorFactory(CppPlugin *owner) :
QLatin1String("h"));
}
QString CppPluginEditorFactory::kind() const
QString CppEditorFactory::kind() const
{
return m_kind;
}
Core::IFile *CppPluginEditorFactory::open(const QString &fileName)
Core::IFile *CppEditorFactory::open(const QString &fileName)
{
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
return iface ? iface->file() : 0;
}
Core::IEditor *CppPluginEditorFactory::createEditor(QWidget *parent)
Core::IEditor *CppEditorFactory::createEditor(QWidget *parent)
{
CPPEditor *editor = new CPPEditor(parent);
editor->setRevisionsVisible(true);
......@@ -97,7 +97,7 @@ Core::IEditor *CppPluginEditorFactory::createEditor(QWidget *parent)
return editor->editableInterface();
}
QStringList CppPluginEditorFactory::mimeTypes() const
QStringList CppEditorFactory::mimeTypes() const
{
return m_mimeTypes;
}
......@@ -159,7 +159,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":/cppeditor/CppEditor.mimetypes.xml"), errorMessage))
return false;
m_factory = new CppPluginEditorFactory(this);
m_factory = new CppEditorFactory(this);
addObject(m_factory);
addAutoReleasedObject(new CppHoverHandler);
......
......@@ -44,7 +44,7 @@ namespace CppEditor {
namespace Internal {
class CPPEditor;
class CppPluginEditorFactory;
class CppEditorFactory;
class CppPlugin : public ExtensionSystem::IPlugin
{
......@@ -67,21 +67,21 @@ private slots:
void jumpToDefinition();
private:
friend class CppPluginEditorFactory;
friend class CppEditorFactory;
Core::IEditor *createEditor(QWidget *parent);
static CppPlugin *m_instance;
TextEditor::TextEditorActionHandler *m_actionHandler;
CppPluginEditorFactory *m_factory;
CppEditorFactory *m_factory;
};
class CppPluginEditorFactory : public Core::IEditorFactory
class CppEditorFactory : public Core::IEditorFactory
{
Q_OBJECT
public:
CppPluginEditorFactory(CppPlugin *owner);
CppEditorFactory(CppPlugin *owner);
virtual QStringList mimeTypes() const;
......
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