forked from qt-creator/qt-creator
Analyzer: refactor global and project tool settings usage.
IAnalyzerTool has now 2 new virtual methods used to create the global and per-project settings. No need to create any static factory method and pass a pointer to them to the AnalyzerGlobalSettings instance anymore. The Valgrind plugin is now using it, the memchecktool creates the settings for all valgrind tools. Change-Id: I3c5845ceb7151130032cfff4ab5b7b36ca2459d9 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
committed by
hjk
parent
4a8432112a
commit
9b19a9c8e2
@@ -41,6 +41,7 @@
|
||||
#include "analyzerstartparameters.h"
|
||||
#include "analyzerutils.h"
|
||||
#include "ianalyzertool.h"
|
||||
#include "analyzersettings.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/findplaceholder.h>
|
||||
@@ -809,6 +810,7 @@ void AnalyzerManager::shutdown()
|
||||
void AnalyzerManager::addTool(IAnalyzerTool *tool, const StartModes &modes)
|
||||
{
|
||||
m_instance->d->addTool(tool, modes);
|
||||
AnalyzerGlobalSettings::instance()->registerTool(tool);
|
||||
}
|
||||
|
||||
QDockWidget *AnalyzerManager::createDockWidget(IAnalyzerTool *tool, const QString &title,
|
||||
@@ -829,6 +831,11 @@ IAnalyzerTool *AnalyzerManager::currentSelectedTool()
|
||||
return m_instance->d->m_currentTool;
|
||||
}
|
||||
|
||||
QList<IAnalyzerTool *> AnalyzerManager::tools()
|
||||
{
|
||||
return m_instance->d->m_tools;
|
||||
}
|
||||
|
||||
void AnalyzerManager::selectTool(IAnalyzerTool *tool, StartMode mode)
|
||||
{
|
||||
m_instance->d->selectTool(tool, mode);
|
||||
|
||||
Reference in New Issue
Block a user