diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-04-25 12:19:48 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-05-08 15:28:06 +0200 |
commit | aa52cfa0e6745d517b11c85a013a35f9712257f5 (patch) | |
tree | 9b340ce1af18460f566858a90524b327bddaf46a /src/plugins/valgrind/valgrindrunner.cpp | |
parent | 9c24a673de5b1c85c319e0b3ed776cbc014f25cd (diff) | |
download | qt-creator-aa52cfa0e6745d517b11c85a013a35f9712257f5.tar.gz |
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>
Diffstat (limited to 'src/plugins/valgrind/valgrindrunner.cpp')
-rw-r--r-- | src/plugins/valgrind/valgrindrunner.cpp | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/plugins/valgrind/valgrindrunner.cpp b/src/plugins/valgrind/valgrindrunner.cpp index cc671ac39b..655ac4105a 100644 --- a/src/plugins/valgrind/valgrindrunner.cpp +++ b/src/plugins/valgrind/valgrindrunner.cpp @@ -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))); - - process->run(valgrindExecutable, valgrindArgs, debuggeeExecutable, debuggeeArguments); + QObject::connect(process, SIGNAL(localHostAddressRetrieved(QHostAddress)), q, + SLOT(localHostAddressRetrieved(QHostAddress))); + + 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(); |