Refactoring: Android Deployment failure error codes

Change-Id: I88165fcad770e8b8341b252e4fc32b437528647b
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
Vikas Pachdha
2016-07-28 17:32:08 +02:00
parent 7e73e9c48f
commit 5cdff92c58
2 changed files with 42 additions and 17 deletions

View File

@@ -59,6 +59,14 @@ class AndroidDeployQtStep : public ProjectExplorer::BuildStep
{
Q_OBJECT
friend class AndroidDeployQtStepFactory;
enum DeployErrorCode
{
NoError = 0,
InconsistentCertificates = 0x0001,
UpdateIncompatible = 0x0002
};
public:
enum UninstallType {
Keep,
@@ -98,14 +106,18 @@ private:
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override { return true; }
void processReadyReadStdOutput();
void processReadyReadStdOutput(DeployErrorCode &errorCode);
void stdOutput(const QString &line);
void processReadyReadStdError();
void processReadyReadStdError(DeployErrorCode &errorCode);
void stdError(const QString &line);
DeployErrorCode parseDeployErrors(QString &deployOutputLine) const;
void slotProcessFinished(int, QProcess::ExitStatus);
void processFinished(int exitCode, QProcess::ExitStatus status);
friend void operator|=(DeployErrorCode &e1, const DeployErrorCode &e2) { e1 = static_cast<AndroidDeployQtStep::DeployErrorCode>((int)e1 | (int)e2); }
friend DeployErrorCode operator|(const DeployErrorCode &e1, const DeployErrorCode &e2) { return static_cast<AndroidDeployQtStep::DeployErrorCode>((int)e1 | (int)e2); }
Utils::FileName m_manifestName;
QString m_serialNumber;
QString m_buildDirectory;
@@ -117,7 +129,6 @@ private:
QString m_targetArch;
bool m_uninstallPreviousPackage;
bool m_uninstallPreviousPackageRun;
bool m_installOk;
bool m_useAndroiddeployqt;
bool m_askForUinstall;
static const Core::Id Id;