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
@@ -36,7 +36,6 @@
|
||||
|
||||
#include "callgrindtool.h"
|
||||
#include "memchecktool.h"
|
||||
#include "valgrindsettings.h"
|
||||
|
||||
#include <analyzerbase/analyzerconstants.h>
|
||||
#include <analyzerbase/analyzermanager.h>
|
||||
@@ -96,20 +95,8 @@ void ValgrindPlugin::startValgrindTool(IAnalyzerTool *tool, StartMode mode)
|
||||
startRemoteTool(tool);
|
||||
}
|
||||
|
||||
static AbstractAnalyzerSubConfig *globalValgrindFactory()
|
||||
{
|
||||
return new ValgrindGlobalSettings();
|
||||
}
|
||||
|
||||
static AbstractAnalyzerSubConfig *projectValgrindFactory()
|
||||
{
|
||||
return new ValgrindProjectSettings();
|
||||
}
|
||||
|
||||
bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
||||
{
|
||||
AnalyzerGlobalSettings::instance()->registerSubConfigs(&globalValgrindFactory, &projectValgrindFactory);
|
||||
|
||||
StartModes modes;
|
||||
#ifndef Q_OS_WIN
|
||||
modes.append(StartMode(StartLocal));
|
||||
|
||||
Reference in New Issue
Block a user