Valgrind: Support MemcheckTool re-running

Disable re-running for CallgrindTool only for now.

Change-Id: I8b2392dda9b707641cd4938fe9d2e62f53cfd69f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2025-01-15 09:05:33 +01:00
parent 2a16fac8b6
commit 86d43d3043
3 changed files with 12 additions and 8 deletions

View File

@@ -30,6 +30,7 @@ CallgrindToolRunner::CallgrindToolRunner(RunControl *runControl)
: ValgrindToolRunner(runControl) : ValgrindToolRunner(runControl)
{ {
setId("CallgrindToolRunner"); setId("CallgrindToolRunner");
runControl->setSupportsReRunning(false);
connect(&m_runner, &ValgrindProcess::valgrindStarted, this, [this](qint64 pid) { connect(&m_runner, &ValgrindProcess::valgrindStarted, this, [this](qint64 pid) {
m_pid = pid; m_pid = pid;

View File

@@ -945,16 +945,20 @@ void MemcheckTool::setupRunner(MemcheckToolRunner *runTool)
this, &MemcheckTool::internalParserError); this, &MemcheckTool::internalParserError);
connect(runControl, &RunControl::stopped, connect(runControl, &RunControl::stopped,
this, &MemcheckTool::engineFinished); this, &MemcheckTool::engineFinished);
connect(runControl, &RunControl::aboutToStart, this, [this] {
m_stopAction->disconnect();
connect(m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
m_toolBusy = true; m_toolBusy = true;
updateRunActions(); updateRunActions();
setBusyCursor(true); setBusyCursor(true);
clearErrorView(); clearErrorView();
m_loadExternalLogFile->setDisabled(true); m_loadExternalLogFile->setDisabled(true);
Debugger::showPermanentStatusMessage(Tr::tr("Starting Memory Analyzer..."));
});
connect(runControl, &RunControl::started, this, [] {
Debugger::showPermanentStatusMessage(Tr::tr("Memory Analyzer running..."));
});
m_stopAction->disconnect();
connect(m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
const FilePath dir = runControl->project()->projectDirectory(); const FilePath dir = runControl->project()->projectDirectory();
const QString name = runControl->commandLine().executable().fileName(); const QString name = runControl->commandLine().executable().fileName();

View File

@@ -29,7 +29,6 @@ ValgrindToolRunner::ValgrindToolRunner(RunControl *runControl)
: RunWorker(runControl) : RunWorker(runControl)
{ {
runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR); runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR);
runControl->setSupportsReRunning(false);
m_settings.fromMap(runControl->settingsData(ANALYZER_VALGRIND_SETTINGS)); m_settings.fromMap(runControl->settingsData(ANALYZER_VALGRIND_SETTINGS));