Commit 4516c41c authored by hjk's avatar hjk Committed by Tobias Hunger
Browse files

taskhub: use more direct access.



Change-Id: Ibc4f37589f913ff9ea0025156979ddda73929e38
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 97c8781f
......@@ -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;
}
......
......@@ -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);
......
......@@ -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"));
}
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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)),
......
......@@ -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)
......
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