forked from qt-creator/qt-creator
Merge DeployConfigurationFactory::{canHandle,canOffer}
Previous uses of canOffer are effectively unchanged in behavior, other plain uses of canHandle now also check the additional requirements on the Qt version on Android (the only platform that had a custom hasBuildTarget() implementation). This is assumed to make no difference in practice. Change-Id: If12895d1421d5565ff91a18bf4d7df96c8191160 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -151,21 +151,11 @@ DeployConfigurationFactory::~DeployConfigurationFactory()
|
||||
g_deployConfigurationFactories.removeOne(this);
|
||||
}
|
||||
|
||||
bool DeployConfigurationFactory::canOffer(Target *parent) const
|
||||
{
|
||||
return canHandle(parent) && hasAvailableBuildTargets(parent);
|
||||
}
|
||||
|
||||
Core::Id DeployConfigurationFactory::creationId() const
|
||||
{
|
||||
return m_deployConfigBaseId;
|
||||
}
|
||||
|
||||
bool DeployConfigurationFactory::hasAvailableBuildTargets(Target *) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QString DeployConfigurationFactory::defaultDisplayName() const
|
||||
{
|
||||
return m_defaultDisplayName;
|
||||
@@ -242,7 +232,7 @@ const QList<DeployConfigurationFactory *> DeployConfigurationFactory::find(Targe
|
||||
{
|
||||
return Utils::filtered(g_deployConfigurationFactories,
|
||||
[&parent](DeployConfigurationFactory *factory) {
|
||||
return factory->canOffer(parent);
|
||||
return factory->canHandle(parent);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user