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

@@ -30,7 +30,6 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/target.h>
#include <qmakeprojectmanager/qmakeproject.h>
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
using namespace ProjectExplorer;
@@ -38,25 +37,23 @@ using namespace ProjectExplorer;
namespace Ios {
namespace Internal {
const char IOS_DEPLOYCONFIGURATION_ID[] = "Qt4ProjectManager.IosDeployConfiguration";
IosDeployConfiguration::IosDeployConfiguration(Target *parent)
: DeployConfiguration(parent, IOS_DEPLOYCONFIGURATION_ID)
IosDeployConfiguration::IosDeployConfiguration(Target *parent, Core::Id id)
: DeployConfiguration(parent, id)
{
}
void IosDeployConfiguration::initialize()
{
stepList()->insertStep(0, new IosDeployStep(stepList()));
stepList()->appendStep(new IosDeployStep(stepList()));
}
IosDeployConfigurationFactory::IosDeployConfigurationFactory()
{
setObjectName("IosDeployConfigurationFactory");
registerDeployConfiguration<IosDeployConfiguration>(IOS_DEPLOYCONFIGURATION_ID);
registerDeployConfiguration<IosDeployConfiguration>("Qt4ProjectManager.IosDeployConfiguration");
setSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID);
setSupportedTargetDeviceTypes({Constants::IOS_DEVICE_TYPE, Constants::IOS_SIMULATOR_TYPE});
setDefaultDisplayName(tr("Deploy on iOS"));
addSupportedTargetDeviceType(Constants::IOS_DEVICE_TYPE);
addSupportedTargetDeviceType(Constants::IOS_SIMULATOR_TYPE);
setDefaultDisplayName(IosDeployConfiguration::tr("Deploy on iOS"));
}
} // namespace Internal