Use new DeployConfigurationFactory::addInitialStep in some cases

Less code, less classes.

Change-Id: I3ba9920f4f389e14c67cd8c5d937a4b4659865e7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-01-18 11:32:53 +01:00
parent 910496130c
commit 372fbf9c05
11 changed files with 35 additions and 62 deletions

View File

@@ -72,7 +72,6 @@ const QLatin1String InstallFailedInconsistentCertificatesString("INSTALL_PARSE_F
const QLatin1String InstallFailedUpdateIncompatible("INSTALL_FAILED_UPDATE_INCOMPATIBLE");
const QLatin1String InstallFailedPermissionModelDowngrade("INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE");
const QLatin1String InstallFailedVersionDowngrade("INSTALL_FAILED_VERSION_DOWNGRADE");
const Core::Id AndroidDeployQtStep::Id("Qt4ProjectManager.AndroidDeployQtStep");
static const char *qmlProjectRunConfigIdName = "QmlProjectManager.QmlRunConfiguration";
@@ -80,7 +79,7 @@ static const char *qmlProjectRunConfigIdName = "QmlProjectManager.QmlRunConfigur
AndroidDeployQtStepFactory::AndroidDeployQtStepFactory()
{
registerStep<AndroidDeployQtStep>(AndroidDeployQtStep::Id);
registerStep<AndroidDeployQtStep>(AndroidDeployQtStep::stepId());
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
setSupportedDeviceType(Constants::ANDROID_DEVICE_TYPE);
setRepeatable(false);
@@ -90,7 +89,7 @@ AndroidDeployQtStepFactory::AndroidDeployQtStepFactory()
// AndroidDeployQtStep
AndroidDeployQtStep::AndroidDeployQtStep(ProjectExplorer::BuildStepList *parent)
: ProjectExplorer::BuildStep(parent, Id)
: ProjectExplorer::BuildStep(parent, stepId())
{
setImmutable(true);
m_uninstallPreviousPackage = QtSupport::QtKitInformation::qtVersion(target()->kit())->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0);
@@ -106,6 +105,11 @@ AndroidDeployQtStep::AndroidDeployQtStep(ProjectExplorer::BuildStepList *parent)
this, &AndroidDeployQtStep::slotSetSerialNumber);
}
Core::Id AndroidDeployQtStep::stepId()
{
return "Qt4ProjectManager.AndroidDeployQtStep";
}
bool AndroidDeployQtStep::init()
{
m_androiddeployqtArgs.clear();