Android: Fix BuilConfiguration priority calculation

Check the supported devices and return the base priority set by the
factory implementation

Task-number: QTCREATORBUG-19573
Change-Id: Ieae68a618d625b3f16f205e544f4626e6a410b91
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Vikas Pachdha
2018-01-10 12:22:00 +01:00
parent 2549b9237e
commit 45d6a34f1e

View File

@@ -338,8 +338,10 @@ int IBuildConfigurationFactory::priority(const Target *parent) const
int IBuildConfigurationFactory::priority(const Kit *k, const QString &projectPath) const int IBuildConfigurationFactory::priority(const Kit *k, const QString &projectPath) const
{ {
QTC_ASSERT(!m_supportedProjectMimeTypeName.isEmpty(), return -1); QTC_ASSERT(!m_supportedProjectMimeTypeName.isEmpty(), return -1);
if (k && Utils::mimeTypeForFile(projectPath).matchesName(m_supportedProjectMimeTypeName)) if (k && Utils::mimeTypeForFile(projectPath).matchesName(m_supportedProjectMimeTypeName) &&
return 0; m_supportedTargetDeviceTypes.contains(DeviceTypeKitInformation::deviceTypeId(k))) {
return m_basePriority;
}
return -1; return -1;
} }