forked from qt-creator/qt-creator
Valgrind: Remove dialog asking for IP address.
When running the memcheck tool remotely, it sends its data via a TCP socket to the development host, so it needs to know that machine's IP address. The current code gathers all local network addresses and makes the user choose one of them. However, we can get that information from the SSH connection, so no user interaction is required. Change-Id: Ia61decddd5fa1e285ca143605d944d6d9275b3e4 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -89,12 +89,6 @@ void ValgrindRunner::Private::run(ValgrindProcess *_process)
|
||||
process->setProcessChannelMode(channelMode);
|
||||
// consider appending our options last so they override any interfering user-supplied options
|
||||
// -q as suggested by valgrind manual
|
||||
QStringList valgrindArgs = valgrindArguments;
|
||||
valgrindArgs << QString::fromLatin1("--tool=%1").arg(q->tool());
|
||||
|
||||
if (Utils::HostOsInfo::isMacHost())
|
||||
// May be slower to start but without it we get no filenames for symbols.
|
||||
valgrindArgs << QLatin1String("--dsymutil=yes");
|
||||
|
||||
QObject::connect(process, SIGNAL(processOutput(QString,Utils::OutputFormat)),
|
||||
q, SIGNAL(processOutputReceived(QString,Utils::OutputFormat)));
|
||||
@@ -104,8 +98,14 @@ void ValgrindRunner::Private::run(ValgrindProcess *_process)
|
||||
q, SLOT(processFinished(int,QProcess::ExitStatus)));
|
||||
QObject::connect(process, SIGNAL(error(QProcess::ProcessError)),
|
||||
q, SLOT(processError(QProcess::ProcessError)));
|
||||
QObject::connect(process, SIGNAL(localHostAddressRetrieved(QHostAddress)), q,
|
||||
SLOT(localHostAddressRetrieved(QHostAddress)));
|
||||
|
||||
process->run(valgrindExecutable, valgrindArgs, debuggeeExecutable, debuggeeArguments);
|
||||
process->setValgrindExecutable(valgrindExecutable);
|
||||
process->setValgrindArguments(q->fullValgrindArguments());
|
||||
process->setDebuggeeExecutable(debuggeeExecutable);
|
||||
process->setDebugeeArguments(debuggeeArguments);
|
||||
process->run();
|
||||
}
|
||||
|
||||
ValgrindRunner::ValgrindRunner(QObject *parent)
|
||||
@@ -144,6 +144,16 @@ QStringList ValgrindRunner::valgrindArguments() const
|
||||
return d->valgrindArguments;
|
||||
}
|
||||
|
||||
QStringList ValgrindRunner::fullValgrindArguments() const
|
||||
{
|
||||
QStringList fullArgs = valgrindArguments();
|
||||
fullArgs << QString::fromLatin1("--tool=%1").arg(tool());
|
||||
if (Utils::HostOsInfo::isMacHost())
|
||||
// May be slower to start but without it we get no filenames for symbols.
|
||||
fullArgs << QLatin1String("--dsymutil=yes");
|
||||
return fullArgs;
|
||||
}
|
||||
|
||||
QString ValgrindRunner::debuggeeExecutable() const
|
||||
{
|
||||
return d->debuggeeExecutable;
|
||||
@@ -246,6 +256,11 @@ void ValgrindRunner::processFinished(int ret, QProcess::ExitStatus status)
|
||||
emit processErrorReceived(errorString(), d->process->error());
|
||||
}
|
||||
|
||||
void ValgrindRunner::localHostAddressRetrieved(const QHostAddress &localHostAddress)
|
||||
{
|
||||
Q_UNUSED(localHostAddress);
|
||||
}
|
||||
|
||||
void ValgrindRunner::processStarted()
|
||||
{
|
||||
emit started();
|
||||
|
||||
Reference in New Issue
Block a user