Commit 46deab83 authored by hjk's avatar hjk
Browse files

Valgrind: Reduce number of function calls



Change-Id: Ie243f55ee7b632d164ed70062fbfd129de3753b9
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent fa1647d8
......@@ -97,26 +97,26 @@ bool ValgrindEngine::start()
emit outputReceived(tr("Commandline arguments: %1").arg(sp.debuggeeArgs), DebugFormat);
#endif
runner()->setWorkingDirectory(sp.workingDirectory);
ValgrindRunner *run = runner();
run->setWorkingDirectory(sp.workingDirectory);
QString valgrindExe = m_settings->subConfig<ValgrindBaseSettings>()->valgrindExecutable();
if (!sp.analyzerCmdPrefix.isEmpty())
valgrindExe = sp.analyzerCmdPrefix + QLatin1Char(' ') + valgrindExe;
runner()->setValgrindExecutable(valgrindExe);
runner()->setValgrindArguments(toolArguments());
runner()->setDebuggeeExecutable(sp.debuggee);
runner()->setDebuggeeArguments(sp.debuggeeArgs);
runner()->setEnvironment(sp.environment);
runner()->setConnectionParameters(sp.connParams);
runner()->setStartMode(sp.startMode);
connect(runner(), SIGNAL(processOutputReceived(QByteArray,Utils::OutputFormat)),
run->setValgrindExecutable(valgrindExe);
run->setValgrindArguments(toolArguments());
run->setDebuggeeExecutable(sp.debuggee);
run->setDebuggeeArguments(sp.debuggeeArgs);
run->setEnvironment(sp.environment);
run->setConnectionParameters(sp.connParams);
run->setStartMode(sp.startMode);
connect(run, SIGNAL(processOutputReceived(QByteArray,Utils::OutputFormat)),
SLOT(receiveProcessOutput(QByteArray,Utils::OutputFormat)));
connect(runner(), SIGNAL(processErrorReceived(QString,QProcess::ProcessError)),
connect(run, SIGNAL(processErrorReceived(QString,QProcess::ProcessError)),
SLOT(receiveProcessError(QString,QProcess::ProcessError)));
connect(runner(), SIGNAL(finished()),
SLOT(runnerFinished()));
connect(run, SIGNAL(finished()), SLOT(runnerFinished()));
if (!runner()->start()) {
if (!run->start()) {
m_progress->cancel();
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment