forked from qt-creator/qt-creator
ProjectExplorer: Remove allDeployConfigurationFactories() accessor
It's only used once to check whether there exist at least one. Since there's always the DefaultConfigurationFactory when the ProjectExplorer is present, this check will always succeed. Change-Id: Id457701bd6c8f68b91a0e225507181a878faac4a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -153,11 +153,6 @@ DeployConfigurationFactory::~DeployConfigurationFactory()
|
|||||||
g_deployConfigurationFactories.removeOne(this);
|
g_deployConfigurationFactories.removeOne(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<DeployConfigurationFactory *> DeployConfigurationFactory::allDeployConfigurationFactories()
|
|
||||||
{
|
|
||||||
return g_deployConfigurationFactories;
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<Core::Id> DeployConfigurationFactory::availableCreationIds(Target *parent) const
|
QList<Core::Id> DeployConfigurationFactory::availableCreationIds(Target *parent) const
|
||||||
{
|
{
|
||||||
if (!canHandle(parent))
|
if (!canHandle(parent))
|
||||||
|
|||||||
@@ -80,8 +80,6 @@ public:
|
|||||||
DeployConfigurationFactory();
|
DeployConfigurationFactory();
|
||||||
~DeployConfigurationFactory();
|
~DeployConfigurationFactory();
|
||||||
|
|
||||||
static QList<DeployConfigurationFactory *> allDeployConfigurationFactories();
|
|
||||||
|
|
||||||
// used to show the list of possible additons to a target, returns a list of types
|
// used to show the list of possible additons to a target, returns a list of types
|
||||||
QList<Core::Id> availableCreationIds(Target *parent) const;
|
QList<Core::Id> availableCreationIds(Target *parent) const;
|
||||||
// used to translate the types to names to display to the user
|
// used to translate the types to names to display to the user
|
||||||
|
|||||||
@@ -262,9 +262,6 @@ void Target::addDeployConfiguration(DeployConfiguration *dc)
|
|||||||
QTC_ASSERT(dc && !d->m_deployConfigurations.contains(dc), return);
|
QTC_ASSERT(dc && !d->m_deployConfigurations.contains(dc), return);
|
||||||
Q_ASSERT(dc->target() == this);
|
Q_ASSERT(dc->target() == this);
|
||||||
|
|
||||||
if (DeployConfigurationFactory::allDeployConfigurationFactories().isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Check that we don't have a configuration with the same displayName
|
// Check that we don't have a configuration with the same displayName
|
||||||
QString configurationDisplayName = dc->displayName();
|
QString configurationDisplayName = dc->displayName();
|
||||||
QStringList displayNames = Utils::transform(d->m_deployConfigurations, &DeployConfiguration::displayName);
|
QStringList displayNames = Utils::transform(d->m_deployConfigurations, &DeployConfiguration::displayName);
|
||||||
|
|||||||
Reference in New Issue
Block a user