Introduce and use IRunConfiguration::addSupportedTargetDeviceType

In line with addSupportedProjectType, saves a few cycles due to the
non-use of the temporary list, and in theory more flexible than the
existing set...(QList<Id>) as it potentially allows dependent plugin
to declare support for already existing configurations instead of
re-implementing their own.

Change-Id: I2b83e90de49daa9bfce6f780c5f51c2e971eb7d1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2018-02-22 08:36:45 +01:00
parent 092d5068bd
commit 39b66f2cb8
10 changed files with 19 additions and 12 deletions

View File

@@ -374,7 +374,7 @@ QbsRunConfigurationFactory::QbsRunConfigurationFactory(QObject *parent) :
setObjectName("QbsRunConfigurationFactory");
registerRunConfiguration<QbsRunConfiguration>(QBS_RC_PREFIX);
addSupportedProjectType(Constants::PROJECT_ID);
setSupportedTargetDeviceTypes({ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE});
addSupportedTargetDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
}
bool QbsRunConfigurationFactory::canCreateHelper(Target *parent, const QString &buildTarget) const