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:
hjk
2022-06-16 13:31:25 +02:00
parent 120f3872d2
commit 6517e3bbe3

View File

@@ -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();
}