Commit e3f770a5 authored by Eike Ziller's avatar Eike Ziller

iOS: Refactor iOS tool chain and kit auto detection

It was all done in one huge, unreadable method.
The refactoring along-side fixes the following:

- iOS tool chains were demoted to manual at start up because there
  was no tool chain factory that would auto detect them
- a QTC_CHECK failed because single Qt Versions could appear multiple
  times in the architecture->Qt version map, because each architecture
  is present in two abis (32-bit and 64-bit)

The refactoring also removes unneeded automatic conversion
from non-iOS Qt version to iOS Qt version, and removes considering GCC
toolchains (which were not handled anyhow, because only Clang
"platforms" were considered).

Change-Id: Ic9ae797646f159ed45959fc797990aa98f2136fb
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 09bc8af6
This diff is collapsed.
......@@ -31,6 +31,7 @@
#define IOSCONFIGURATIONS_H
#include <projectexplorer/abi.h>
#include <projectexplorer/toolchain.h>
#include <utils/fileutils.h>
#include <QObject>
......@@ -44,6 +45,15 @@ QT_END_NAMESPACE
namespace Ios {
namespace Internal {
class IosToolChainFactory : public ProjectExplorer::ToolChainFactory
{
Q_OBJECT
public:
QList<ProjectExplorer::ToolChain *> autoDetect(const QList<ProjectExplorer::ToolChain *> &existingToolChains) override;
};
class IosConfigurations : public QObject
{
Q_OBJECT
......
......@@ -69,6 +69,7 @@ bool IosPlugin::initialize(const QStringList &arguments, QString *errorMessage)
Internal::IosConfigurations::initialize();
addAutoReleasedObject(new Internal::IosToolChainFactory);
addAutoReleasedObject(new Internal::IosRunControlFactory);
addAutoReleasedObject(new Internal::IosRunConfigurationFactory);
addAutoReleasedObject(new Internal::IosSettingsPage);
......
......@@ -290,4 +290,24 @@ QMap<QString, Platform> IosProbe::detectedPlatforms()
return m_platforms;
}
QDebug operator<<(QDebug debug, const Platform &platform)
{
QDebugStateSaver saver(debug); Q_UNUSED(saver)
debug.nospace() << "(name=" << platform.name
<< ", compiler=" << platform.compilerPath.toString()
<< ", flags=" << platform.backendFlags
<< ")";
return debug;
}
bool Platform::operator==(const Platform &other) const
{
return name == other.name;
}
uint qHash(const Platform &platform)
{
return qHash(platform.name);
}
}
......@@ -54,8 +54,14 @@ public:
Utils::FileName compilerPath;
QString architecture;
QStringList backendFlags;
// ignores anything besides name
bool operator==(const Platform &other) const;
};
uint qHash(const Platform &platform);
QDebug operator<<(QDebug debug, const Platform &platform);
class IosProbe
{
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment