Commit 6339ddfc authored by Daniel Teske's avatar Daniel Teske

AndroidDeployQt: If the user wants to reinstall, do it immediately

Task-number: QTCREATORBUG-13427
Change-Id: I49ab3be15fc38df1564ee10f9515d92fbb6ff047
Reviewed-by: default avatarBogDan Vatra <>
parent 8ab7f673
This diff is collapsed.
...@@ -38,6 +38,10 @@ ...@@ -38,6 +38,10 @@
#include <projectexplorer/abstractprocessstep.h> #include <projectexplorer/abstractprocessstep.h>
#include <qtsupport/baseqtversion.h> #include <qtsupport/baseqtversion.h>
namespace Utils {
class QtcProcess;
class QAbstractItemModel; class QAbstractItemModel;
...@@ -66,7 +70,7 @@ public: ...@@ -66,7 +70,7 @@ public:
ProjectExplorer::BuildStep *product); ProjectExplorer::BuildStep *product);
}; };
class AndroidDeployQtStep : public ProjectExplorer::AbstractProcessStep class AndroidDeployQtStep : public ProjectExplorer::BuildStep
{ {
friend class AndroidDeployQtStepFactory; friend class AndroidDeployQtStepFactory;
...@@ -89,6 +93,10 @@ public: ...@@ -89,6 +93,10 @@ public:
public slots: public slots:
void setUninstallPreviousPackage(bool uninstall); void setUninstallPreviousPackage(bool uninstall);
void askForUninstall();
void setSerialNumber(const QString &serialNumber);
private: private:
AndroidDeployQtStep(ProjectExplorer::BuildStepList *bc, AndroidDeployQtStep(ProjectExplorer::BuildStepList *bc,
AndroidDeployQtStep *other); AndroidDeployQtStep *other);
...@@ -97,11 +105,21 @@ private: ...@@ -97,11 +105,21 @@ private:
bool init(); bool init();
void run(QFutureInterface<bool> &fi); void run(QFutureInterface<bool> &fi);
enum DeployResult { Success, Failure, AskUinstall };
DeployResult runDeploy(QFutureInterface<bool> &fi);
void slotAskForUninstall();
void slotSetSerialNumber(const QString &serialNumber);
ProjectExplorer::BuildStepConfigWidget *createConfigWidget(); ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool immutable() const { return true; } bool immutable() const { return true; }
void processReadyReadStdOutput();
void stdOutput(const QString &line); void stdOutput(const QString &line);
void processReadyReadStdError();
void stdError(const QString &line); void stdError(const QString &line);
virtual bool processSucceeded(int exitCode, QProcess::ExitStatus status);
void slotProcessFinished(int, QProcess::ExitStatus);
void processFinished(int exitCode, QProcess::ExitStatus status);
Utils::FileName m_manifestName; Utils::FileName m_manifestName;
QString m_serialNumber; QString m_serialNumber;
...@@ -112,13 +130,17 @@ private: ...@@ -112,13 +130,17 @@ private:
QString m_targetArch; QString m_targetArch;
int m_deviceAPILevel; int m_deviceAPILevel;
bool m_uninstallPreviousPackage; bool m_uninstallPreviousPackage;
bool m_uninstallPreviousPackageTemp;
bool m_uninstallPreviousPackageRun; bool m_uninstallPreviousPackageRun;
static const Core::Id Id; static const Core::Id Id;
bool m_installOk; bool m_installOk;
bool m_useAndroiddeployqt; bool m_useAndroiddeployqt;
AndroidBuildApkStep::AndroidDeployAction m_deployAction;
QString m_androiddeployqtArgs; QString m_androiddeployqtArgs;
QString m_adbPath;
QString m_command;
QString m_workingDirectory;
Utils::Environment m_environment;
Utils::QtcProcess *m_process;
bool m_askForUinstall;
}; };
} }
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