Commit 8bb83b51 authored by BogDan Vatra's avatar BogDan Vatra
Browse files

Force uninstall of any Qt apps that are using Qt < 5.4

On Qt 5.4 the problem was fixed by
https://codereview.qt-project.org/#/c/91261/



Change-Id: Id139fe2fe1e83ac5108ffeeb140cb8d2f16747c7
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 41942ac0
......@@ -253,6 +253,7 @@ bool AndroidDeployQtStep::init()
break;
}
} else {
m_uninstallPreviousPackageRun = true;
pp->setCommand(AndroidConfigurations::currentConfig().adbToolPath().toString());
m_apkPath = AndroidManager::androidQtSupport(target())->apkPath(target(), AndroidManager::signPackage(target())
? AndroidQtSupport::ReleaseBuildSigned
......@@ -404,7 +405,9 @@ bool AndroidDeployQtStep::runInGuiThread() const
return true;
}
bool AndroidDeployQtStep::uninstallPreviousPackage()
AndroidDeployQtStep::UninstallType AndroidDeployQtStep::uninstallPreviousPackage()
{
return m_uninstallPreviousPackage;
if (QtSupport::QtKitInformation::qtVersion(target()->kit())->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0))
return ForceUnintall;
return m_uninstallPreviousPackage ? Uninstall : Keep;
}
......@@ -69,6 +69,12 @@ class AndroidDeployQtStep : public ProjectExplorer::AbstractProcessStep
{
Q_OBJECT
friend class AndroidDeployQtStepFactory;
public:
enum UninstallType {
Keep,
Uninstall,
ForceUnintall
};
public:
AndroidDeployQtStep(ProjectExplorer::BuildStepList *bc);
......@@ -77,7 +83,7 @@ public:
bool runInGuiThread() const;
bool uninstallPreviousPackage();
UninstallType uninstallPreviousPackage();
public slots:
void setUninstallPreviousPackage(bool uninstall);
......
......@@ -46,7 +46,8 @@ AndroidDeployQtWidget::AndroidDeployQtWidget(AndroidDeployQtStep *step)
{
m_ui->setupUi(this);
m_ui->uninstallPreviousPackage->setChecked(m_step->uninstallPreviousPackage());
m_ui->uninstallPreviousPackage->setChecked(m_step->uninstallPreviousPackage() > AndroidDeployQtStep::Keep);
m_ui->uninstallPreviousPackage->setEnabled(m_step->uninstallPreviousPackage() != AndroidDeployQtStep::ForceUnintall);
connect(m_ui->installMinistroButton, SIGNAL(clicked()), SLOT(installMinistro()));
connect(m_ui->cleanLibsPushButton, SIGNAL(clicked()), SLOT(cleanLibsOnDevice()));
connect(m_ui->resetDefaultDevices, SIGNAL(clicked()), SLOT(resetDefaultDevices()));
......
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