forked from qt-creator/qt-creator
Valgrind: Simplify connection setup
It's static 1:1 nowadays. Change-Id: I0bdc62bda4aade6753b04c42d95fbbdf70c37386 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -61,6 +61,17 @@ ValgrindToolRunner::ValgrindToolRunner(RunControl *runControl)
|
||||
setSupportsReRunning(false);
|
||||
|
||||
m_settings.fromMap(runControl->settingsData(ANALYZER_VALGRIND_SETTINGS));
|
||||
|
||||
connect(&m_runner, &ValgrindRunner::processOutputReceived,
|
||||
this, &ValgrindToolRunner::receiveProcessOutput);
|
||||
connect(&m_runner, &ValgrindRunner::valgrindExecuted,
|
||||
this, [this](const QString &commandLine) {
|
||||
appendMessage(commandLine, NormalMessageFormat);
|
||||
});
|
||||
connect(&m_runner, &ValgrindRunner::processErrorReceived,
|
||||
this, &ValgrindToolRunner::receiveProcessError);
|
||||
connect(&m_runner, &ValgrindRunner::finished,
|
||||
this, &ValgrindToolRunner::runnerFinished);
|
||||
}
|
||||
|
||||
void ValgrindToolRunner::start()
|
||||
@@ -96,17 +107,6 @@ void ValgrindToolRunner::start()
|
||||
if (auto aspect = runControl()->aspect<TerminalAspect>())
|
||||
m_runner.setUseTerminal(aspect->useTerminal);
|
||||
|
||||
connect(&m_runner, &ValgrindRunner::processOutputReceived,
|
||||
this, &ValgrindToolRunner::receiveProcessOutput);
|
||||
connect(&m_runner, &ValgrindRunner::valgrindExecuted,
|
||||
this, [this](const QString &commandLine) {
|
||||
appendMessage(commandLine, NormalMessageFormat);
|
||||
});
|
||||
connect(&m_runner, &ValgrindRunner::processErrorReceived,
|
||||
this, &ValgrindToolRunner::receiveProcessError);
|
||||
connect(&m_runner, &ValgrindRunner::finished,
|
||||
this, &ValgrindToolRunner::runnerFinished);
|
||||
|
||||
if (!m_runner.start()) {
|
||||
m_progress.cancel();
|
||||
reportFailure();
|
||||
@@ -161,11 +161,6 @@ void ValgrindToolRunner::runnerFinished()
|
||||
|
||||
m_progress.reportFinished();
|
||||
|
||||
disconnect(&m_runner, &ValgrindRunner::processOutputReceived,
|
||||
this, &ValgrindToolRunner::receiveProcessOutput);
|
||||
disconnect(&m_runner, &ValgrindRunner::finished,
|
||||
this, &ValgrindToolRunner::runnerFinished);
|
||||
|
||||
reportStopped();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user