summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@digia.com>2013-06-06 17:00:46 +0200
committerDaniel Teske <daniel.teske@digia.com>2013-06-11 16:13:14 +0200
commit8127ebe244c9c6a2561e592e2ed550d7b6d67115 (patch)
tree3d7a329c6876dd6c4a159c28de9f1d23e6eff577
parent8011d0c32b68d68352497a3023ea3fe43cb87ac1 (diff)
downloadqt-creator-8127ebe244c9c6a2561e592e2ed550d7b6d67115.tar.gz
Android: Show complete output of ant run
Change-Id: I4964e5bf22a715375a7fa080604d16692c956fc2 Reviewed-by: BogDan Vatra <bogdan@kde.org>
-rw-r--r--src/plugins/android/androidpackagecreationstep.cpp28
-rw-r--r--src/plugins/android/androidpackagecreationstep.h1
2 files changed, 19 insertions, 10 deletions
diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp
index 76b29b402a..5616af1f05 100644
--- a/src/plugins/android/androidpackagecreationstep.cpp
+++ b/src/plugins/android/androidpackagecreationstep.cpp
@@ -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);
}
}
diff --git a/src/plugins/android/androidpackagecreationstep.h b/src/plugins/android/androidpackagecreationstep.h
index 19c0168293..64c958702c 100644
--- a/src/plugins/android/androidpackagecreationstep.h
+++ b/src/plugins/android/androidpackagecreationstep.h
@@ -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;