Analyzer: Remove IAnalyzerTool::canRun

That's taken care of the run control factories directly now

Change-Id: I1cd7470e78a93459bee878f5e32594e7cf339a91
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
hjk
2013-07-31 08:54:45 +02:00
parent 12a32f145c
commit cad3b13bbd
9 changed files with 5 additions and 39 deletions

View File

@@ -524,11 +524,6 @@ RunMode CallgrindTool::runMode() const
return CallgrindRunMode;
}
bool CallgrindTool::canRun(RunConfiguration *, RunMode mode) const
{
return mode == CallgrindRunMode;
}
QString CallgrindTool::displayName() const
{
return tr("Valgrind Function Profiler");

View File

@@ -50,7 +50,6 @@ public:
QString displayName() const;
QString description() const;
ToolMode toolMode() const;
bool canRun(ProjectExplorer::RunConfiguration *, ProjectExplorer::RunMode mode) const;
void extensionsInitialized();

View File

@@ -286,11 +286,6 @@ RunMode MemcheckTool::runMode() const
return MemcheckRunMode;
}
bool MemcheckTool::canRun(RunConfiguration *, RunMode mode) const
{
return mode == MemcheckRunMode;
}
QString MemcheckTool::displayName() const
{
return tr("Valgrind Memory Analyzer");

View File

@@ -88,7 +88,6 @@ public:
ProjectExplorer::RunMode runMode() const;
QString displayName() const;
QString description() const;
bool canRun(ProjectExplorer::RunConfiguration *, ProjectExplorer::RunMode mode) const;
// Create the valgrind settings (for all valgrind tools)
Analyzer::AbstractAnalyzerSubConfig *createGlobalSettings();

View File

@@ -61,12 +61,8 @@ ValgrindRunControlFactory::ValgrindRunControlFactory(QObject *parent) :
bool ValgrindRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mode) const
{
if (mode != CallgrindRunMode && mode != MemcheckRunMode)
return false;
IAnalyzerTool *tool = AnalyzerManager::toolFromRunMode(mode);
if (tool)
return tool->canRun(runConfiguration, mode);
return false;
Q_UNUSED(runConfiguration);
return mode == CallgrindRunMode || mode == MemcheckRunMode;
}
static AnalyzerStartParameters createValgrindStartParameters(RunConfiguration *runConfiguration)