Analyzer: Move tool startup code closer to the action setup

The code sharing in the base was along a somewhat unfortunate
boundary. Moving it into the only user also removes some of
the wrong local/remote separation.

Change-Id: I0be9636ea448d123f9f5105a52d56f47ff7871c3
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
hjk
2015-06-18 09:35:41 +02:00
committed by Ulf Hermann
parent 3ea517636f
commit 9494303bdf
8 changed files with 58 additions and 100 deletions

View File

@@ -594,42 +594,12 @@ void MemcheckTool::setBusyCursor(bool busy)
m_errorView->setCursor(cursor);
}
void MemcheckTool::startLocalTool()
{
if (checkForLocalStart(DebugMode))
ProjectExplorerPlugin::runStartupProject(MemcheckRunMode);
}
void MemcheckTool::startRemoteTool()
{
AnalyzerStartParameters sp;
if (checkForRemoteStart(&sp)) {
AnalyzerRunControl *rc = createRunControl(sp, 0);
ProjectExplorerPlugin::startRunControl(rc, MemcheckRunMode);
}
}
MemcheckWithGdbTool::MemcheckWithGdbTool(QObject *parent) :
MemcheckTool(parent)
{
setObjectName(QLatin1String("MemcheckWithGdbTool"));
}
void MemcheckWithGdbTool::startLocalTool()
{
if (checkForLocalStart(DebugMode))
ProjectExplorerPlugin::runStartupProject(MemcheckWithGdbRunMode);
}
void MemcheckWithGdbTool::startRemoteTool()
{
AnalyzerStartParameters sp;
if (checkForRemoteStart(&sp)) {
AnalyzerRunControl *rc = createRunControl(sp, 0);
ProjectExplorerPlugin::startRunControl(rc, MemcheckWithGdbRunMode);
}
}
MemcheckRunControl *MemcheckWithGdbTool::createMemcheckRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration)
{