forked from qt-creator/qt-creator
Docker: Don't swallow output when startup fails
Previously error output occurring while the PID marker was not parsed yet was not passed on to the parent QtcProcess. Change-Id: Id6cbaa13a7d6c62d7a8612e118092eb2be6e790c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -238,8 +238,8 @@ DockerProcessImpl::DockerProcessImpl(IDevice::ConstPtr device, DockerDevicePriva
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(&m_process, &QtcProcess::readyReadStandardOutput, this, [this] {
|
connect(&m_process, &QtcProcess::readyReadStandardOutput, this, [this] {
|
||||||
if (!m_hasReceivedFirstOutput) {
|
|
||||||
QByteArray output = m_process.readAllRawStandardOutput();
|
QByteArray output = m_process.readAllRawStandardOutput();
|
||||||
|
if (!m_hasReceivedFirstOutput) {
|
||||||
qsizetype idx = output.indexOf('\n');
|
qsizetype idx = output.indexOf('\n');
|
||||||
QByteArray firstLine = output.left(idx).trimmed();
|
QByteArray firstLine = output.left(idx).trimmed();
|
||||||
QByteArray rest = output.mid(idx + 1);
|
QByteArray rest = output.mid(idx + 1);
|
||||||
@@ -259,7 +259,7 @@ DockerProcessImpl::DockerProcessImpl(IDevice::ConstPtr device, DockerDevicePriva
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit readyRead(m_process.readAllRawStandardOutput(), {});
|
emit readyRead(output, {});
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(&m_process, &QtcProcess::readyReadStandardError, this, [this] {
|
connect(&m_process, &QtcProcess::readyReadStandardError, this, [this] {
|
||||||
|
Reference in New Issue
Block a user