forked from qt-creator/qt-creator
Analyzer: Handle createProjectSettings outside IAnalyzerTool
Less indirection. Change-Id: If702a0a44c1fc96510fd1c5411fda51660dde10b Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
@@ -297,11 +297,6 @@ QString MemcheckTool::description() const
|
||||
"memory leaks");
|
||||
}
|
||||
|
||||
AbstractAnalyzerSubConfig *MemcheckTool::createProjectSettings()
|
||||
{
|
||||
return new ValgrindProjectSettings();
|
||||
}
|
||||
|
||||
IAnalyzerTool::ToolMode MemcheckTool::toolMode() const
|
||||
{
|
||||
return DebugMode;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user