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
|
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;
|
Abi targetAbi() const override;
|
||||||
QString originalTargetTriple() const override;
|
QString originalTargetTriple() const override;
|
||||||
QString version() const;
|
QString version() const;
|
||||||
QList<Abi> supportedAbis() const;
|
QList<Abi> supportedAbis() const override;
|
||||||
void setTargetAbi(const Abi &);
|
void setTargetAbi(const Abi &);
|
||||||
|
|
||||||
bool isValid() const override;
|
bool isValid() const override;
|
||||||
|
@@ -135,6 +135,11 @@ Core::Id ToolChain::typeId() const
|
|||||||
return d->m_typeId;
|
return d->m_typeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<Abi> ToolChain::supportedAbis() const
|
||||||
|
{
|
||||||
|
return { targetAbi() };
|
||||||
|
}
|
||||||
|
|
||||||
bool ToolChain::canClone() const
|
bool ToolChain::canClone() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@@ -80,6 +80,7 @@ public:
|
|||||||
Core::Id typeId() const;
|
Core::Id typeId() const;
|
||||||
virtual QString typeDisplayName() const = 0;
|
virtual QString typeDisplayName() const = 0;
|
||||||
virtual Abi targetAbi() const = 0;
|
virtual Abi targetAbi() const = 0;
|
||||||
|
virtual QList<Abi> supportedAbis() const;
|
||||||
virtual QString originalTargetTriple() const { return QString(); }
|
virtual QString originalTargetTriple() const { return QString(); }
|
||||||
|
|
||||||
virtual bool isValid() const = 0;
|
virtual bool isValid() const = 0;
|
||||||
|
@@ -342,8 +342,11 @@ QList<ToolChain *> ToolChainManager::findToolChains(const Abi &abi)
|
|||||||
{
|
{
|
||||||
QList<ToolChain *> result;
|
QList<ToolChain *> result;
|
||||||
foreach (ToolChain *tc, d->m_toolChains) {
|
foreach (ToolChain *tc, d->m_toolChains) {
|
||||||
Abi targetAbi = tc->targetAbi();
|
bool isCompatible = Utils::anyOf(tc->supportedAbis(), [abi](const Abi &supportedAbi) {
|
||||||
if (targetAbi.isCompatibleWith(abi))
|
return supportedAbi.isCompatibleWith(abi);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isCompatible)
|
||||||
result.append(tc);
|
result.append(tc);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user