Make DeployConfigurationFactory more similar to RunConfigFactories

This follows some of the recent changes to RunConfigurations:
- pass Id from factory to DeployConfiguration constructors
- de-object-ify DeployConfigurationFactory
- use addSupportedTargetDeviceType(Id) instead of
  addSupportedTargetDeviceType(List<Id>)

Also, use stepList()->appendStep() instead of stepList()->insertStep(pos...)
with manual pos tracking in some cases.

Change-Id: I09c6a9d0f66f9f85b1c13361104f7878028e1ea8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2018-04-30 16:50:51 +02:00
parent 8f6a560ed7
commit cf43803032
14 changed files with 56 additions and 89 deletions

View File

@@ -44,23 +44,20 @@ using namespace ProjectExplorer;
namespace Android {
namespace Internal {
// Qt 5.2 has a new form of deployment
const char ANDROID_DEPLOYCONFIGURATION_ID[] = "Qt4ProjectManager.AndroidDeployConfiguration2";
AndroidDeployConfiguration::AndroidDeployConfiguration(Target *parent)
: DeployConfiguration(parent, ANDROID_DEPLOYCONFIGURATION_ID)
AndroidDeployConfiguration::AndroidDeployConfiguration(Target *parent, Core::Id id)
: DeployConfiguration(parent, id)
{}
void AndroidDeployConfiguration::initialize()
{
stepList()->insertStep(0, new AndroidDeployQtStep(stepList()));
stepList()->appendStep(new AndroidDeployQtStep(stepList()));
}
AndroidDeployConfigurationFactory::AndroidDeployConfigurationFactory()
{
setObjectName("AndroidDeployConfigurationFactory");
registerDeployConfiguration<AndroidDeployConfiguration>(ANDROID_DEPLOYCONFIGURATION_ID);
setSupportedTargetDeviceTypes({Constants::ANDROID_DEVICE_TYPE});
registerDeployConfiguration<AndroidDeployConfiguration>
("Qt4ProjectManager.AndroidDeployConfiguration2");
addSupportedTargetDeviceType(Constants::ANDROID_DEVICE_TYPE);
setDefaultDisplayName(AndroidDeployConfiguration::tr("Deploy to Android device"));
}