forked from qt-creator/qt-creator
Utils: Remove couple of functions from QtcProcess
Some functions do not work and should therefore not be used. Line-based processing of the output interferes with the internal automatic usage of the ChannelBuffers. Remove the respective functions and move the line parsing over to the client. Change-Id: Iaaa58c181e35e132fae863ddb808547142c99221 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -527,12 +527,17 @@ QWidget *AndroidDeployQtStep::createConfigWidget()
|
||||
|
||||
void AndroidDeployQtStep::processReadyReadStdOutput(DeployErrorCode &errorCode)
|
||||
{
|
||||
m_process->setReadChannel(QProcess::StandardOutput);
|
||||
while (m_process->canReadLine()) {
|
||||
QString line = QString::fromLocal8Bit(m_process->readLine());
|
||||
const QByteArray output = m_process->readAllStandardOutput();
|
||||
int start = 0;
|
||||
int end;
|
||||
|
||||
do {
|
||||
end = output.indexOf('\n', start);
|
||||
QString line = QString::fromLocal8Bit(output.mid(start, end - start));
|
||||
errorCode |= parseDeployErrors(line);
|
||||
stdOutput(line);
|
||||
}
|
||||
start = end + 1;
|
||||
} while (end >= 0);
|
||||
}
|
||||
|
||||
void AndroidDeployQtStep::stdOutput(const QString &line)
|
||||
@@ -542,12 +547,17 @@ void AndroidDeployQtStep::stdOutput(const QString &line)
|
||||
|
||||
void AndroidDeployQtStep::processReadyReadStdError(DeployErrorCode &errorCode)
|
||||
{
|
||||
m_process->setReadChannel(QProcess::StandardError);
|
||||
while (m_process->canReadLine()) {
|
||||
QString line = QString::fromLocal8Bit(m_process->readLine());
|
||||
const QByteArray output = m_process->readAllStandardError();
|
||||
int start = 0;
|
||||
int end;
|
||||
|
||||
do {
|
||||
end = output.indexOf('\n', start);
|
||||
QString line = QString::fromLocal8Bit(output.mid(start, end - start));
|
||||
errorCode |= parseDeployErrors(line);
|
||||
stdError(line);
|
||||
}
|
||||
start = end + 1;
|
||||
} while (end >= 0);
|
||||
}
|
||||
|
||||
void AndroidDeployQtStep::stdError(const QString &line)
|
||||
|
||||
Reference in New Issue
Block a user