diff options
author | Christian Kandeler <christian.kandeler@nokia.com> | 2012-06-08 09:42:32 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-06-08 10:15:43 +0200 |
commit | 79de09f2663f818bb07c24752e6520b19b28e6ec (patch) | |
tree | 4ee8e676e73646f42476f4f01df3756997836f48 /src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp | |
parent | 303e67304e42cc419b735ca609104ad4ed386d54 (diff) | |
download | qt-creator-79de09f2663f818bb07c24752e6520b19b28e6ec.tar.gz |
SSH: Streamline SshRemoteProcessRunner's output handling.
Make it just like SshRemoteProcess (and QProcess). The current
implementation annoyingly forces client code to establish additional
signal/slot connections, even if they only want to evaluate the output
at the end.
Change-Id: Id8c30dd156574d7d26d848d8e0705856a16d3747
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp')
-rw-r--r-- | src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp index 021755c6eb..e5595db2e3 100644 --- a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp +++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp @@ -99,10 +99,8 @@ void RemoteLinuxCustomCommandDeployService::doDeploy() if (!d->runner) d->runner = new SshRemoteProcessRunner(this); - connect(d->runner, SIGNAL(processOutputAvailable(QByteArray)), - SLOT(handleStdout(QByteArray))); - connect(d->runner, SIGNAL(processErrorOutputAvailable(QByteArray)), - SLOT(handleStderr(QByteArray))); + connect(d->runner, SIGNAL(readyReadStandardOutput()), SLOT(handleStdout())); + connect(d->runner, SIGNAL(readyReadStandardError()), SLOT(handleStderr())); connect(d->runner, SIGNAL(processClosed(int)), SLOT(handleProcessClosed(int))); emit progressMessage(tr("Starting remote command '%1'...").arg(d->commandLine)); @@ -120,14 +118,14 @@ void RemoteLinuxCustomCommandDeployService::stopDeployment() handleDeploymentDone(); } -void RemoteLinuxCustomCommandDeployService::handleStdout(const QByteArray &output) +void RemoteLinuxCustomCommandDeployService::handleStdout() { - emit stdOutData(QString::fromUtf8(output)); + emit stdOutData(QString::fromUtf8(d->runner->readAllStandardOutput())); } -void RemoteLinuxCustomCommandDeployService::handleStderr(const QByteArray &output) +void RemoteLinuxCustomCommandDeployService::handleStderr() { - emit stdErrData(QString::fromUtf8(output)); + emit stdErrData(QString::fromUtf8(d->runner->readAllStandardError())); } void RemoteLinuxCustomCommandDeployService::handleProcessClosed(int exitStatus) |