forked from qt-creator/qt-creator
iOS: Fixes false warnings about iOS kit and Qt version
iOS Qt version complains about missing compilers and the corresponding kit complains about unsupported device Task-number: QTCREATORBUG-16472 Change-Id: Ie2185e33ec5043de0230a325b48b21dc1a25109e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -116,5 +116,6 @@ QSet<Core::Id> IosQtVersion::availableFeatures() const
|
||||
|
||||
QSet<Core::Id> IosQtVersion::targetDeviceTypes() const
|
||||
{
|
||||
return { Constants::IOS_DEVICE_TYPE };
|
||||
// iOS Qt version supports ios devices as well as simulator.
|
||||
return { Constants::IOS_DEVICE_TYPE, Constants::IOS_SIMULATOR_TYPE };
|
||||
}
|
||||
|
@@ -56,7 +56,7 @@ public:
|
||||
Abi targetAbi() const override;
|
||||
QString originalTargetTriple() const override;
|
||||
QString version() const;
|
||||
QList<Abi> supportedAbis() const;
|
||||
QList<Abi> supportedAbis() const override;
|
||||
void setTargetAbi(const Abi &);
|
||||
|
||||
bool isValid() const override;
|
||||
|
@@ -135,6 +135,11 @@ Core::Id ToolChain::typeId() const
|
||||
return d->m_typeId;
|
||||
}
|
||||
|
||||
QList<Abi> ToolChain::supportedAbis() const
|
||||
{
|
||||
return { targetAbi() };
|
||||
}
|
||||
|
||||
bool ToolChain::canClone() const
|
||||
{
|
||||
return true;
|
||||
|
@@ -80,6 +80,7 @@ public:
|
||||
Core::Id typeId() const;
|
||||
virtual QString typeDisplayName() const = 0;
|
||||
virtual Abi targetAbi() const = 0;
|
||||
virtual QList<Abi> supportedAbis() const;
|
||||
virtual QString originalTargetTriple() const { return QString(); }
|
||||
|
||||
virtual bool isValid() const = 0;
|
||||
|
@@ -342,8 +342,11 @@ QList<ToolChain *> ToolChainManager::findToolChains(const Abi &abi)
|
||||
{
|
||||
QList<ToolChain *> result;
|
||||
foreach (ToolChain *tc, d->m_toolChains) {
|
||||
Abi targetAbi = tc->targetAbi();
|
||||
if (targetAbi.isCompatibleWith(abi))
|
||||
bool isCompatible = Utils::anyOf(tc->supportedAbis(), [abi](const Abi &supportedAbi) {
|
||||
return supportedAbi.isCompatibleWith(abi);
|
||||
});
|
||||
|
||||
if (isCompatible)
|
||||
result.append(tc);
|
||||
}
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user