forked from qt-creator/qt-creator
Valgrind: Announce 'started', not 'stopped' on startup
Also provide a name for the workers. Change-Id: I323c498db1eeb8225170aae080fdf084aa53e14a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -42,6 +42,7 @@ using namespace Valgrind::Internal;
|
|||||||
CallgrindToolRunner::CallgrindToolRunner(ProjectExplorer::RunControl *runControl)
|
CallgrindToolRunner::CallgrindToolRunner(ProjectExplorer::RunControl *runControl)
|
||||||
: ValgrindToolRunner(runControl)
|
: ValgrindToolRunner(runControl)
|
||||||
{
|
{
|
||||||
|
setDisplayName("CallgrindToolRunner");
|
||||||
connect(&m_runner, &Callgrind::CallgrindRunner::finished,
|
connect(&m_runner, &Callgrind::CallgrindRunner::finished,
|
||||||
this, &CallgrindToolRunner::slotFinished);
|
this, &CallgrindToolRunner::slotFinished);
|
||||||
connect(m_runner.parser(), &Callgrind::Parser::parserDataReady,
|
connect(m_runner.parser(), &Callgrind::Parser::parserDataReady,
|
||||||
|
|||||||
@@ -770,7 +770,7 @@ ValgrindToolRunner *CallgrindTool::createRunTool(RunControl *runControl)
|
|||||||
connect(this, &CallgrindTool::resetRequested, toolRunner, &CallgrindToolRunner::reset);
|
connect(this, &CallgrindTool::resetRequested, toolRunner, &CallgrindToolRunner::reset);
|
||||||
connect(this, &CallgrindTool::pauseToggled, toolRunner, &CallgrindToolRunner::setPaused);
|
connect(this, &CallgrindTool::pauseToggled, toolRunner, &CallgrindToolRunner::setPaused);
|
||||||
|
|
||||||
connect(m_stopAction, &QAction::triggered, toolRunner, [toolRunner] { toolRunner->stop(); });
|
connect(m_stopAction, &QAction::triggered, toolRunner, [runControl] { runControl->stop(); });
|
||||||
|
|
||||||
// initialize run control
|
// initialize run control
|
||||||
toolRunner->setPaused(m_pauseAction->isChecked());
|
toolRunner->setPaused(m_pauseAction->isChecked());
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ namespace Internal {
|
|||||||
MemcheckToolRunner::MemcheckToolRunner(RunControl *runControl)
|
MemcheckToolRunner::MemcheckToolRunner(RunControl *runControl)
|
||||||
: ValgrindToolRunner(runControl)
|
: ValgrindToolRunner(runControl)
|
||||||
{
|
{
|
||||||
|
setDisplayName("MemcheckToolRunner");
|
||||||
connect(&m_parser, &XmlProtocol::ThreadedParser::error,
|
connect(&m_parser, &XmlProtocol::ThreadedParser::error,
|
||||||
this, &MemcheckToolRunner::parserError);
|
this, &MemcheckToolRunner::parserError);
|
||||||
connect(&m_parser, &XmlProtocol::ThreadedParser::suppressionCount,
|
connect(&m_parser, &XmlProtocol::ThreadedParser::suppressionCount,
|
||||||
|
|||||||
@@ -576,7 +576,7 @@ RunWorker *MemcheckTool::createRunWorker(RunControl *runControl)
|
|||||||
this, [this, runTool] { engineStarting(runTool); });
|
this, [this, runTool] { engineStarting(runTool); });
|
||||||
connect(runTool, &MemcheckToolRunner::parserError, this, &MemcheckTool::parserError);
|
connect(runTool, &MemcheckToolRunner::parserError, this, &MemcheckTool::parserError);
|
||||||
connect(runTool, &MemcheckToolRunner::internalParserError, this, &MemcheckTool::internalParserError);
|
connect(runTool, &MemcheckToolRunner::internalParserError, this, &MemcheckTool::internalParserError);
|
||||||
connect(runControl, &RunControl::finished, this, &MemcheckTool::engineFinished);
|
connect(runTool, &MemcheckToolRunner::stopped, this, &MemcheckTool::engineFinished);
|
||||||
|
|
||||||
connect(m_stopAction, &QAction::triggered, runControl, &RunControl::stop);
|
connect(m_stopAction, &QAction::triggered, runControl, &RunControl::stop);
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ void ValgrindToolRunner::runnerFinished()
|
|||||||
disconnect(runner(), &ValgrindRunner::finished,
|
disconnect(runner(), &ValgrindRunner::finished,
|
||||||
this, &ValgrindToolRunner::runnerFinished);
|
this, &ValgrindToolRunner::runnerFinished);
|
||||||
|
|
||||||
reportStarted();
|
reportStopped();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ValgrindToolRunner::receiveProcessOutput(const QString &output, OutputFormat format)
|
void ValgrindToolRunner::receiveProcessOutput(const QString &output, OutputFormat format)
|
||||||
|
|||||||
Reference in New Issue
Block a user