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:
hjk
2019-01-16 11:07:04 +01:00
parent 8ec2eb87a4
commit bc239e240e
4 changed files with 7 additions and 16 deletions

View File

@@ -60,8 +60,11 @@ AndroidDeployConfigurationFactory::AndroidDeployConfigurationFactory()
setDefaultDisplayName(AndroidDeployConfiguration::tr("Deploy to Android device"));
}
bool AndroidDeployConfigurationFactory::hasAvailableBuildTargets(Target *parent) const
bool AndroidDeployConfigurationFactory::canHandle(Target *parent) const
{
if (!DeployConfigurationFactory::canHandle(parent))
return false;
if (!parent->project()->id().name().startsWith("QmlProjectManager.QmlProject")) {
// Avoid tool chain check for QML Project
Core::Id cxxLangId(ProjectExplorer::Constants::CXX_LANGUAGE_ID);