forked from qt-creator/qt-creator
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:
@@ -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");
|
||||
|
||||
@@ -50,7 +50,6 @@ public:
|
||||
QString displayName() const;
|
||||
QString description() const;
|
||||
ToolMode toolMode() const;
|
||||
bool canRun(ProjectExplorer::RunConfiguration *, ProjectExplorer::RunMode mode) const;
|
||||
|
||||
void extensionsInitialized();
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user