replace Core::ICore::instance()->pluginManager() by ExtensionSystem::PluginManager::instance()

This commit is contained in:
hjk
2009-01-20 15:31:33 +01:00
parent 67437acf49
commit 897c05f57c
94 changed files with 467 additions and 634 deletions

View File

@@ -43,28 +43,26 @@
namespace VCSBase {
struct BaseVCSEditorFactoryPrivate {
BaseVCSEditorFactoryPrivate(const VCSBaseEditorParameters *t, Core::ICore *core);
struct BaseVCSEditorFactoryPrivate
{
BaseVCSEditorFactoryPrivate(const VCSBaseEditorParameters *t);
const VCSBaseEditorParameters *m_type;
const QString m_kind;
const QStringList m_mimeTypes;
Core::ICore *m_core;
TextEditor::TextEditorActionHandler *m_editorHandler;
};
BaseVCSEditorFactoryPrivate::BaseVCSEditorFactoryPrivate(const VCSBaseEditorParameters *t, Core::ICore *core) :
BaseVCSEditorFactoryPrivate::BaseVCSEditorFactoryPrivate(const VCSBaseEditorParameters *t) :
m_type(t),
m_kind(QLatin1String(t->kind)),
m_mimeTypes(QStringList(QLatin1String(t->mimeType))),
m_core(core),
m_editorHandler(new TextEditor::TextEditorActionHandler(core, t->kind))
m_editorHandler(new TextEditor::TextEditorActionHandler(t->kind))
{
}
BaseVCSEditorFactory::BaseVCSEditorFactory(const VCSBaseEditorParameters *t,
Core::ICore *core) :
m_d(new BaseVCSEditorFactoryPrivate(t, core))
BaseVCSEditorFactory::BaseVCSEditorFactory(const VCSBaseEditorParameters *t)
: m_d(new BaseVCSEditorFactoryPrivate(t))
{
}
@@ -85,7 +83,7 @@ QString BaseVCSEditorFactory::kind() const
Core::IFile *BaseVCSEditorFactory::open(const QString &fileName)
{
Core::IEditor *iface = m_d->m_core->editorManager()->openEditor(fileName, kind());
Core::IEditor *iface = Core::ICore::instance()->editorManager()->openEditor(fileName, kind());
return iface ? iface->file() : 0;
}

View File

@@ -41,14 +41,6 @@
#include <QtCore/QStringList>
namespace TextEditor {
class TextEditorActionHandler;
}
namespace Core {
class ICore;
}
namespace VCSBase {
struct BaseVCSEditorFactoryPrivate;
@@ -59,8 +51,7 @@ class VCSBASE_EXPORT BaseVCSEditorFactory : public Core::IEditorFactory
{
Q_OBJECT
public:
explicit BaseVCSEditorFactory(const VCSBaseEditorParameters *type,
Core::ICore *core);
explicit BaseVCSEditorFactory(const VCSBaseEditorParameters *type);
virtual ~BaseVCSEditorFactory();
virtual QStringList mimeTypes() const;
@@ -85,7 +76,6 @@ class VCSEditorFactory : public BaseVCSEditorFactory
{
public:
explicit VCSEditorFactory(const VCSBaseEditorParameters *type,
Core::ICore *core,
QObject *describeReceiver = 0,
const char *describeSlot = 0);
@@ -98,10 +88,9 @@ private:
template <class Editor>
VCSEditorFactory<Editor>::VCSEditorFactory(const VCSBaseEditorParameters *type,
Core::ICore *core,
QObject *describeReceiver,
const char *describeSlot) :
BaseVCSEditorFactory(type, core),
BaseVCSEditorFactory(type),
m_describeReceiver(describeReceiver),
m_describeSlot(describeSlot)
{