forked from qt-creator/qt-creator
ProjectExplorer: Simplify collection of RunConfigurationCreationInfos
Instead of calling twice for AutoCreated and UserCreated, call once and record to which case it belongs. Only the 'both' and 'user only' combination are ever used. Change-Id: I9c15085bcbb4bf6584a6156135f2084dbfc51c1c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -449,9 +449,8 @@ const QList<IRunConfigurationFactory *> IRunConfigurationFactory::allRunConfigur
|
||||
}
|
||||
|
||||
QList<RunConfigurationCreationInfo>
|
||||
IRunConfigurationFactory::availableCreators(Target *parent, IRunConfigurationFactory::CreationMode mode) const
|
||||
IRunConfigurationFactory::availableCreators(Target *parent) const
|
||||
{
|
||||
Q_UNUSED(mode);
|
||||
return Utils::transform(parent->applicationTargets().list, [this](const BuildTargetInfo &ti) {
|
||||
return RunConfigurationCreationInfo(this, m_runConfigBaseId, ti.targetName,
|
||||
QFileInfo(ti.targetName).completeBaseName());
|
||||
@@ -610,12 +609,9 @@ FixedRunConfigurationFactory::FixedRunConfigurationFactory(const QString &displa
|
||||
{ }
|
||||
|
||||
QList<RunConfigurationCreationInfo>
|
||||
FixedRunConfigurationFactory::availableCreators(Target *parent, CreationMode mode) const
|
||||
FixedRunConfigurationFactory::availableCreators(Target *parent) const
|
||||
{
|
||||
Q_UNUSED(mode);
|
||||
if (!canHandle(parent))
|
||||
return {};
|
||||
|
||||
Q_UNUSED(parent);
|
||||
return {RunConfigurationCreationInfo(this, runConfigurationBaseId(), QString(), m_fixedBuildTarget)};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user