forked from qt-creator/qt-creator
Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... and re-use the old QtcProcess::readAllStandard* names for a QString-returning 'decoded' version. For now, only use that in 'full Utf8' cases, to stay bug-compatible, the plan is, however, to employ the QTextCodecs we have already in the channel buffers. That will be one-by-one, though. Change-Id: Id209e0671920d4ea4197918e872f441254112d52 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -236,7 +236,7 @@ DockerProcessImpl::DockerProcessImpl(IDevice::ConstPtr device, DockerDevicePriva
|
||||
|
||||
connect(&m_process, &QtcProcess::readyReadStandardOutput, this, [this] {
|
||||
if (!m_hasReceivedFirstOutput) {
|
||||
QByteArray output = m_process.readAllStandardOutput();
|
||||
QByteArray output = m_process.readAllRawStandardOutput();
|
||||
qsizetype idx = output.indexOf('\n');
|
||||
QByteArray firstLine = output.left(idx);
|
||||
QByteArray rest = output.mid(idx + 1);
|
||||
@@ -256,11 +256,11 @@ DockerProcessImpl::DockerProcessImpl(IDevice::ConstPtr device, DockerDevicePriva
|
||||
return;
|
||||
}
|
||||
}
|
||||
emit readyRead(m_process.readAllStandardOutput(), {});
|
||||
emit readyRead(m_process.readAllRawStandardOutput(), {});
|
||||
});
|
||||
|
||||
connect(&m_process, &QtcProcess::readyReadStandardError, this, [this] {
|
||||
emit readyRead({}, m_process.readAllStandardError());
|
||||
emit readyRead({}, m_process.readAllRawStandardError());
|
||||
});
|
||||
|
||||
connect(&m_process, &QtcProcess::done, this, [this] {
|
||||
@@ -1005,7 +1005,7 @@ public:
|
||||
m_process->setCommand(cmd);
|
||||
|
||||
connect(m_process, &QtcProcess::readyReadStandardOutput, this, [this] {
|
||||
const QString out = QString::fromUtf8(m_process->readAllStandardOutput().trimmed());
|
||||
const QString out = m_process->readAllStandardOutput().trimmed();
|
||||
m_log->append(out);
|
||||
for (const QString &line : out.split('\n')) {
|
||||
const QStringList parts = line.trimmed().split('\t');
|
||||
|
||||
Reference in New Issue
Block a user