Analyzer: Handle createProjectSettings outside IAnalyzerTool

Less indirection.

Change-Id: If702a0a44c1fc96510fd1c5411fda51660dde10b
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
hjk
2013-08-08 11:25:28 +02:00
parent 2e0434dd25
commit 15caea1d26
10 changed files with 35 additions and 29 deletions

View File

@@ -297,11 +297,6 @@ QString MemcheckTool::description() const
"memory leaks");
}
AbstractAnalyzerSubConfig *MemcheckTool::createProjectSettings()
{
return new ValgrindProjectSettings();
}
IAnalyzerTool::ToolMode MemcheckTool::toolMode() const
{
return DebugMode;

View File

@@ -89,9 +89,6 @@ public:
QString displayName() const;
QString description() const;
// Create the valgrind settings (for all valgrind tools)
Analyzer::AbstractAnalyzerSubConfig *createProjectSettings();
private slots:
void settingsDestroyed(QObject *settings);
void maybeActiveRunConfigurationChanged();

View File

@@ -48,9 +48,18 @@ using namespace Analyzer;
namespace Valgrind {
namespace Internal {
class ProjectSettingsFactory : public AnalyzerSubConfigFactory
{
AbstractAnalyzerSubConfig *createProjectSettings()
{
return new ValgrindProjectSettings();
}
};
bool ValgrindPlugin::initialize(const QStringList &, QString *)
{
AnalyzerGlobalSettings::registerConfig(new ValgrindGlobalSettings());
AnalyzerRunConfigurationAspect::registerConfigFactory(new ProjectSettingsFactory());
IAnalyzerTool *memcheckTool = new MemcheckTool(this);
IAnalyzerTool *callgrindTool = new CallgrindTool(this);