Commit 8127ebe2 authored by Daniel Teske's avatar Daniel Teske
Browse files

Android: Show complete output of ant run



Change-Id: I4964e5bf22a715375a7fa080604d16692c956fc2
Reviewed-by: default avatarBogDan Vatra <bogdan@kde.org>
parent 8011d0c3
......@@ -818,6 +818,10 @@ bool AndroidPackageCreationStep::runCommand(QProcess *buildProc
return false;
}
buildProc->waitForFinished(-1);
handleProcessOutput(buildProc, false);
handleProcessOutput(buildProc, true);
if (buildProc->error() != QProcess::UnknownError
|| buildProc->exitCode() != 0) {
QString mainMessage = tr("Packaging Error: Command '%1 %2' failed.")
......@@ -837,13 +841,7 @@ void AndroidPackageCreationStep::handleBuildStdOutOutput()
QProcess *const process = qobject_cast<QProcess *>(sender());
if (!process)
return;
process->setReadChannel(QProcess::StandardOutput);
while (process->canReadLine()) {
QString line = QString::fromLocal8Bit(process->readLine());
m_outputParser.stdOutput(line);
emit addOutput(line, BuildStep::NormalOutput, BuildStep::DontAppendNewline);
}
handleProcessOutput(process, false);
}
void AndroidPackageCreationStep::handleBuildStdErrOutput()
......@@ -852,11 +850,21 @@ void AndroidPackageCreationStep::handleBuildStdErrOutput()
if (!process)
return;
process->setReadChannel(QProcess::StandardError);
handleProcessOutput(process, true);
}
void AndroidPackageCreationStep::handleProcessOutput(QProcess *process, bool stdErr)
{
process->setReadChannel(stdErr ? QProcess::StandardError : QProcess::StandardOutput);
while (process->canReadLine()) {
QString line = QString::fromLocal8Bit(process->readLine());
m_outputParser.stdError(line);
emit addOutput(line, BuildStep::ErrorOutput, BuildStep::DontAppendNewline);
if (stdErr)
m_outputParser.stdError(line);
else
m_outputParser.stdOutput(line);
emit addOutput(line, stdErr ? BuildStep::ErrorOutput
: BuildStep::NormalOutput,
BuildStep::DontAppendNewline);
}
}
......
......@@ -113,6 +113,7 @@ private:
static const Core::Id CreatePackageId;
private:
void handleProcessOutput(QProcess *process, bool stdErr);
Utils::FileName m_keystorePath;
QString m_keystorePasswd;
QString m_certificateAlias;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment