Android: Give preference to detected deploy errors

Task-number: QTCREATORBUG-17414
Change-Id: I35171dc8649c9ecd790a1a508ccc3d4f690ee67b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Vikas Pachdha
2018-04-16 13:59:13 +02:00
parent 8771054060
commit 9a946decc3

View File

@@ -325,11 +325,12 @@ AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::runDeploy(QFutureInter
emit addOutput(tr("The process \"%1\" crashed.").arg(m_command), BuildStep::OutputFormat::ErrorMessage);
}
if (exitCode == 0 && exitStatus == QProcess::NormalExit) {
if (deployError != NoError && m_uninstallPreviousPackageRun) {
deployError = Failure;
}
} else {
if (deployError != NoError) {
if (m_uninstallPreviousPackageRun)
deployError = Failure; // Even re-install failed. Set to Failure.
} else if (exitCode != 0 || exitStatus != QProcess::NormalExit) {
// Set the deployError to Failure when no deployError code was detected
// but the adb tool failed otherwise relay the detected deployError.
deployError = Failure;
}