summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2012-03-07 16:40:03 +0100
committerTobias Hunger <tobias.hunger@nokia.com>2012-03-12 10:58:47 +0100
commit4516c41ce31ca3d5756c6f44542fe34153bb487f (patch)
treedae210c9dacf2e3a1548256fe55738c29a09267f
parent97c8781f404ae2020facfa7b82a522f71ec655a6 (diff)
downloadqt-creator-4516c41ce31ca3d5756c6f44542fe34153bb487f.tar.gz
taskhub: use more direct access.
Change-Id: Ibc4f37589f913ff9ea0025156979ddda73929e38 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
-rw-r--r--src/plugins/analyzerbase/analyzerplugin.cpp7
-rw-r--r--src/plugins/analyzerbase/analyzerruncontrol.cpp12
-rw-r--r--src/plugins/debugger/debuggerengine.cpp5
-rw-r--r--src/plugins/projectexplorer/buildmanager.cpp2
-rw-r--r--src/plugins/qmljseditor/qmljseditorplugin.cpp8
-rw-r--r--src/plugins/qmljseditor/qmltaskmanager.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp5
7 files changed, 19 insertions, 24 deletions
diff --git a/src/plugins/analyzerbase/analyzerplugin.cpp b/src/plugins/analyzerbase/analyzerplugin.cpp
index a8a3367c3e..fd7084de9c 100644
--- a/src/plugins/analyzerbase/analyzerplugin.cpp
+++ b/src/plugins/analyzerbase/analyzerplugin.cpp
@@ -43,7 +43,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
-#include <extensionsystem/pluginmanager.h>
+#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/task.h>
#include <projectexplorer/taskhub.h>
@@ -83,10 +83,9 @@ bool AnalyzerPlugin::initialize(const QStringList &arguments, QString *errorStri
addAutoReleasedObject(new AnalyzerRunControlFactory());
// Task integration.
- ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
- ProjectExplorer::TaskHub *hub = pm->getObject<ProjectExplorer::TaskHub>();
//: Category under which Analyzer tasks are listed in Issues view
- hub->addCategory(Core::Id(Constants::ANALYZERTASK_ID), tr("Analyzer"));
+ ProjectExplorer::ProjectExplorerPlugin::instance()->taskHub()
+ ->addCategory(Core::Id(Constants::ANALYZERTASK_ID), tr("Analyzer"));
return true;
}
diff --git a/src/plugins/analyzerbase/analyzerruncontrol.cpp b/src/plugins/analyzerbase/analyzerruncontrol.cpp
index bda27e8fbf..5cb91674a5 100644
--- a/src/plugins/analyzerbase/analyzerruncontrol.cpp
+++ b/src/plugins/analyzerbase/analyzerruncontrol.cpp
@@ -39,8 +39,8 @@
#include "analyzermanager.h"
#include "analyzerstartparameters.h"
-#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/applicationrunconfiguration.h>
+#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/task.h>
#include <projectexplorer/taskhub.h>
@@ -115,10 +115,9 @@ void AnalyzerRunControl::start()
AnalyzerManager::handleToolStarted();
- // clear about-to-be-outdated tasks
- ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
- TaskHub *hub = pm->getObject<TaskHub>();
- hub->clearTasks(Core::Id(Constants::ANALYZERTASK_ID));
+ // Clear about-to-be-outdated tasks.
+ ProjectExplorerPlugin::instance()->taskHub()
+ ->clearTasks(Core::Id(Constants::ANALYZERTASK_ID));
if (d->m_engine->start()) {
d->m_isRunning = true;
@@ -177,8 +176,7 @@ void AnalyzerRunControl::receiveOutput(const QString &text, Utils::OutputFormat
void AnalyzerRunControl::addTask(Task::TaskType type, const QString &description,
const QString &file, int line)
{
- ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
- TaskHub *hub = pm->getObject<TaskHub>();
+ TaskHub *hub = ProjectExplorerPlugin::instance()->taskHub();
hub->addTask(Task(type, description, Utils::FileName::fromUserInput(file), line,
Core::Id(Constants::ANALYZERTASK_ID)));
hub->popup(false);
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index ab623dee5b..15b1d81824 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -61,8 +61,8 @@
#include <texteditor/itexteditor.h>
#include <texteditor/basetextmark.h>
+#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h>
-#include <extensionsystem/pluginmanager.h>
#include <utils/savedaction.h>
#include <utils/qtcassert.h>
@@ -1953,8 +1953,7 @@ void DebuggerEnginePrivate::reportTestError(const QString &msg, int line)
m_foundError = true;
if (!m_taskHub) {
- ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
- m_taskHub = pm->getObject<TaskHub>();
+ m_taskHub = ProjectExplorerPlugin::instance()->taskHub();
m_taskHub->addCategory(Core::Id("DebuggerTest"), tr("Debugger Test"));
}
diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp
index 983d50d0a6..a68576db17 100644
--- a/src/plugins/projectexplorer/buildmanager.cpp
+++ b/src/plugins/projectexplorer/buildmanager.cpp
@@ -141,7 +141,7 @@ BuildManager::BuildManager(ProjectExplorerPlugin *parent)
d->m_outputWindow = new Internal::CompileOutputWindow(this);
pm->addObject(d->m_outputWindow);
- d->m_taskHub = pm->getObject<TaskHub>();
+ d->m_taskHub = ProjectExplorerPlugin::instance()->taskHub();
d->m_taskWindow = new Internal::TaskWindow(d->m_taskHub);
pm->addObject(d->m_taskWindow);
diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp
index 6795134d62..357f0dd4af 100644
--- a/src/plugins/qmljseditor/qmljseditorplugin.cpp
+++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp
@@ -64,7 +64,7 @@
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/editormanager.h>
#include <projectexplorer/taskhub.h>
-#include <extensionsystem/pluginmanager.h>
+#include <projectexplorer/projectexplorer.h>
#include <texteditor/texteditorconstants.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/textfilewizard.h>
@@ -84,6 +84,7 @@
using namespace QmlJSEditor;
using namespace QmlJSEditor::Internal;
using namespace QmlJSEditor::Constants;
+using namespace ProjectExplorer;
enum {
QUICKFIX_INTERVAL = 20
@@ -266,8 +267,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
void QmlJSEditorPlugin::extensionsInitialized()
{
- ProjectExplorer::TaskHub *taskHub =
- ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::TaskHub>();
+ TaskHub *taskHub = ProjectExplorerPlugin::instance()->taskHub();
taskHub->addCategory(Constants::TASK_CATEGORY_QML, tr("QML"));
taskHub->addCategory(Constants::TASK_CATEGORY_QML_ANALYSIS, tr("QML Analysis"), false);
}
@@ -380,7 +380,7 @@ void QmlJSEditorPlugin::currentEditorChanged(Core::IEditor *editor)
void QmlJSEditorPlugin::runSemanticScan()
{
m_qmlTaskManager->updateSemanticMessagesNow();
- ProjectExplorer::TaskHub *hub = ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::TaskHub>();
+ TaskHub *hub = ProjectExplorerPlugin::instance()->taskHub();
hub->setCategoryVisibility(Constants::TASK_CATEGORY_QML_ANALYSIS, true);
hub->popup(false);
}
diff --git a/src/plugins/qmljseditor/qmltaskmanager.cpp b/src/plugins/qmljseditor/qmltaskmanager.cpp
index 4a238d5b8d..ed4e636af1 100644
--- a/src/plugins/qmljseditor/qmltaskmanager.cpp
+++ b/src/plugins/qmljseditor/qmltaskmanager.cpp
@@ -34,7 +34,7 @@
#include "qmljseditorconstants.h"
#include <coreplugin/idocument.h>
-#include <extensionsystem/pluginmanager.h>
+#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <qmljs/qmljscontext.h>
@@ -57,7 +57,7 @@ QmlTaskManager::QmlTaskManager(QObject *parent) :
m_taskHub(0),
m_updatingSemantic(false)
{
- m_taskHub = ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::TaskHub>();
+ m_taskHub = ProjectExplorer::ProjectExplorerPlugin::instance()->taskHub();
// displaying results incrementally leads to flickering
// connect(&m_messageCollector, SIGNAL(resultsReadyAt(int,int)),
diff --git a/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp b/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
index 97754fe163..1f5f980135 100644
--- a/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
@@ -32,7 +32,7 @@
#include "sbsv2parser.h"
-#include <extensionsystem/pluginmanager.h>
+#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/taskhub.h>
@@ -55,8 +55,7 @@ SbsV2Parser::SbsV2Parser() :
m_hub(0)
{
setObjectName(QLatin1String("SbsV2Parser"));
- ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
- m_hub = pm->getObject<TaskHub>();
+ m_hub = ProjectExplorerPlugin::instance()->taskHub();
}
void SbsV2Parser::stdOutput(const QString &line)