taskhub: use more direct access.

Change-Id: Ibc4f37589f913ff9ea0025156979ddda73929e38
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
hjk
2012-03-07 16:40:03 +01:00
committed by Tobias Hunger
parent 97c8781f40
commit 4516c41ce3
7 changed files with 19 additions and 24 deletions

View File

@@ -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);
}

View File

@@ -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)),