forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user