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

@@ -97,10 +97,10 @@ static QString formatCommand(const QString &binary, const QStringList &args)
}
// ---------------- GitClient
GitClient::GitClient(GitPlugin* plugin, Core::ICore *core) :
m_msgWait(tr("Waiting for data...")),
GitClient::GitClient(GitPlugin* plugin)
: m_msgWait(tr("Waiting for data...")),
m_plugin(plugin),
m_core(core)
m_core(Core::ICore::instance())
{
if (QSettings *s = m_core->settings())
m_settings.fromSettings(s);

View File

@@ -68,7 +68,7 @@ class GitClient : public QObject
Q_OBJECT
public:
explicit GitClient(GitPlugin *plugin, Core::ICore *core);
explicit GitClient(GitPlugin *plugin);
~GitClient();
bool managesDirectory(const QString &) const { return false; }

View File

@@ -233,7 +233,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message)
Q_UNUSED(error_message);
m_core = Core::ICore::instance();
m_gitClient = new GitClient(this, m_core);
m_gitClient = new GitClient(this);
// Create the globalcontext list to register actions accordingly
QList<int> globalcontext;
globalcontext << m_core->uniqueIDManager()->
@@ -250,7 +250,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message)
static const char *describeSlot = SLOT(show(QString,QString));
const int editorCount = sizeof(editorParameters)/sizeof(VCSBase::VCSBaseEditorParameters);
for (int i = 0; i < editorCount; i++) {
m_editorFactories.push_back(new GitEditorFactory(editorParameters + i, m_core, m_gitClient, describeSlot));
m_editorFactories.push_back(new GitEditorFactory(editorParameters + i, m_gitClient, describeSlot));
addObject(m_editorFactories.back());
}
@@ -622,7 +622,7 @@ void GitPlugin::startCommit()
Core::IEditor *GitPlugin::openSubmitEditor(const QString &fileName, const CommitData &cd)
{
Core::IEditor *editor = m_core->editorManager()->openEditor(fileName, QLatin1String(Constants::GITSUBMITEDITOR_KIND));
Core::IEditor *editor = m_core->editorManager()->openEditor(fileName, QLatin1String(Constants::GITSUBMITEDITOR_KIND));
if (Git::Constants::debug)
qDebug() << Q_FUNC_INFO << fileName << editor;
m_core->editorManager()->ensureEditorManagerVisible();