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() ...@@ -97,26 +97,26 @@ bool ValgrindEngine::start()
emit outputReceived(tr("Commandline arguments: %1").arg(sp.debuggeeArgs), DebugFormat); emit outputReceived(tr("Commandline arguments: %1").arg(sp.debuggeeArgs), DebugFormat);
#endif #endif
runner()->setWorkingDirectory(sp.workingDirectory); ValgrindRunner *run = runner();
run->setWorkingDirectory(sp.workingDirectory);
QString valgrindExe = m_settings->subConfig<ValgrindBaseSettings>()->valgrindExecutable(); QString valgrindExe = m_settings->subConfig<ValgrindBaseSettings>()->valgrindExecutable();
if (!sp.analyzerCmdPrefix.isEmpty()) if (!sp.analyzerCmdPrefix.isEmpty())
valgrindExe = sp.analyzerCmdPrefix + QLatin1Char(' ') + valgrindExe; valgrindExe = sp.analyzerCmdPrefix + QLatin1Char(' ') + valgrindExe;
runner()->setValgrindExecutable(valgrindExe); run->setValgrindExecutable(valgrindExe);
runner()->setValgrindArguments(toolArguments()); run->setValgrindArguments(toolArguments());
runner()->setDebuggeeExecutable(sp.debuggee); run->setDebuggeeExecutable(sp.debuggee);
runner()->setDebuggeeArguments(sp.debuggeeArgs); run->setDebuggeeArguments(sp.debuggeeArgs);
runner()->setEnvironment(sp.environment); run->setEnvironment(sp.environment);
runner()->setConnectionParameters(sp.connParams); run->setConnectionParameters(sp.connParams);
runner()->setStartMode(sp.startMode); run->setStartMode(sp.startMode);
connect(runner(), SIGNAL(processOutputReceived(QByteArray,Utils::OutputFormat)), connect(run, SIGNAL(processOutputReceived(QByteArray,Utils::OutputFormat)),
SLOT(receiveProcessOutput(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))); SLOT(receiveProcessError(QString,QProcess::ProcessError)));
connect(runner(), SIGNAL(finished()), connect(run, SIGNAL(finished()), SLOT(runnerFinished()));
SLOT(runnerFinished()));
if (!runner()->start()) { if (!run->start()) {
m_progress->cancel(); m_progress->cancel();
return false; 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