diff options
author | Jonathan Liu <net147@gmail.com> | 2018-09-20 13:48:58 +1000 |
---|---|---|
committer | Jonathan Liu <net147@gmail.com> | 2018-09-21 13:12:10 +0000 |
commit | 813c16854df6be7fd1f1a8013d0b180f6248e5ab (patch) | |
tree | 6af95de6bfaed1038d77a7d647865b104d0af455 | |
parent | ac9ab687403a2bbd4689ac14da3fc6f6594da7a1 (diff) |
SshDeviceProcess: Don't emit readyRead signals if no data available
Task-number: QTCREATORBUG-19367
Change-Id: I477800b2e2060748c2b5f9fde3acc91d9f5ae176
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp index b34e0ce805..3bb813d55d 100644 --- a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp +++ b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp @@ -245,13 +245,19 @@ void SshDeviceProcess::handleProcessFinished(int exitStatus) void SshDeviceProcess::handleStdout() { - d->stdOut += d->process->readAllStandardOutput(); + QByteArray output = d->process->readAllStandardOutput(); + if (output.isEmpty()) + return; + d->stdOut += output; emit readyReadStandardOutput(); } void SshDeviceProcess::handleStderr() { - d->stdErr += d->process->readAllStandardError(); + QByteArray output = d->process->readAllStandardError(); + if (output.isEmpty()) + return; + d->stdErr += output; emit readyReadStandardError(); } |