summaryrefslogtreecommitdiff
path: root/src/plugins/valgrind/valgrindprocess.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-11-14 17:23:51 +0100
committerChristian Kandeler <christian.kandeler@nokia.com>2011-11-14 17:42:27 +0100
commit232724cc11db671e9e92aa02a8b974f63ca26553 (patch)
treeb737f7455feb01b09aa6313ad89b40cde1e0f9c3 /src/plugins/valgrind/valgrindprocess.cpp
parent75a7bf2919f83474006564405a443704d9fadd52 (diff)
downloadqt-creator-232724cc11db671e9e92aa02a8b974f63ca26553.tar.gz
SSH: Make API of SshRemoteProcess more similar to the one of QProcess.
In the end, we want to derive it from QIODevice as well. Change-Id: I30e7cb23ec8e5753c363d1f4457b650556860ac2 Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/plugins/valgrind/valgrindprocess.cpp')
-rw-r--r--src/plugins/valgrind/valgrindprocess.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/plugins/valgrind/valgrindprocess.cpp b/src/plugins/valgrind/valgrindprocess.cpp
index e58c5ee54a..d6264b1f7e 100644
--- a/src/plugins/valgrind/valgrindprocess.cpp
+++ b/src/plugins/valgrind/valgrindprocess.cpp
@@ -210,10 +210,8 @@ void RemoteValgrindProcess::connected()
cmd += m_valgrindExe + ' ' + arguments;
m_process = m_connection->createRemoteProcess(cmd.toUtf8());
- connect(m_process.data(), SIGNAL(errorOutputAvailable(QByteArray)),
- this, SLOT(standardError(QByteArray)));
- connect(m_process.data(), SIGNAL(outputAvailable(QByteArray)),
- this, SLOT(standardOutput(QByteArray)));
+ connect(m_process.data(), SIGNAL(readyReadStandardError()), this, SLOT(standardError()));
+ connect(m_process.data(), SIGNAL(readyReadStandardOutput()), this, SLOT(standardOutput()));
connect(m_process.data(), SIGNAL(closed(int)),
this, SLOT(closed(int)));
connect(m_process.data(), SIGNAL(started()),
@@ -250,17 +248,15 @@ void RemoteValgrindProcess::processStarted()
).arg(proc, QFileInfo(m_debuggee).fileName());
m_findPID = m_connection->createRemoteProcess(cmd.toUtf8());
- connect(m_findPID.data(), SIGNAL(errorOutputAvailable(QByteArray)),
- this, SLOT(standardOutput(QByteArray)));
- connect(m_findPID.data(), SIGNAL(outputAvailable(QByteArray)),
- this, SLOT(findPIDOutputReceived(QByteArray)));
+ connect(m_findPID.data(), SIGNAL(readyReadStandardError()), this, SLOT(standardError()));
+ connect(m_findPID.data(), SIGNAL(readyReadStandardOutput()), SLOT(findPIDOutputReceived()));
m_findPID->start();
}
-void RemoteValgrindProcess::findPIDOutputReceived(const QByteArray &output)
+void RemoteValgrindProcess::findPIDOutputReceived()
{
bool ok;
- m_pid = output.trimmed().toLongLong(&ok);
+ m_pid = m_findPID->readAllStandardOutput().trimmed().toLongLong(&ok);
if (!ok) {
m_pid = 0;
m_errorString = tr("Could not determine remote PID.");
@@ -272,14 +268,14 @@ void RemoteValgrindProcess::findPIDOutputReceived(const QByteArray &output)
}
}
-void RemoteValgrindProcess::standardOutput(const QByteArray &output)
+void RemoteValgrindProcess::standardOutput()
{
- emit processOutput(output, Utils::StdOutFormat);
+ emit processOutput(m_process->readAllStandardOutput(), Utils::StdOutFormat);
}
-void RemoteValgrindProcess::standardError(const QByteArray &output)
+void RemoteValgrindProcess::standardError()
{
- emit processOutput(output, Utils::StdErrFormat);
+ emit processOutput(m_process->readAllStandardError(), Utils::StdErrFormat);
}
void RemoteValgrindProcess::error(Utils::SshError error)