forked from qt-creator/qt-creator
Ios: Use setup function for toolchain factory
Change-Id: I5c78061327fd57acb1e5803a67dd0a619c26a60c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -569,11 +569,17 @@ ProvisioningProfilePtr IosConfigurations::provisioningProfile(const QString &pro
|
||||
equal(&ProvisioningProfile::identifier, profileID));
|
||||
}
|
||||
|
||||
IosToolchainFactory::IosToolchainFactory()
|
||||
class IosToolchainFactory final : public ToolchainFactory
|
||||
{
|
||||
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
||||
}
|
||||
public:
|
||||
IosToolchainFactory()
|
||||
{
|
||||
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
||||
}
|
||||
|
||||
Toolchains autoDetect(const ToolchainDetector &detector) const final;
|
||||
};
|
||||
|
||||
Toolchains IosToolchainFactory::autoDetect(const ToolchainDetector &detector) const
|
||||
{
|
||||
@@ -612,6 +618,11 @@ Toolchains IosToolchainFactory::autoDetect(const ToolchainDetector &detector) co
|
||||
return toolChains;
|
||||
}
|
||||
|
||||
void setupIosToolchain()
|
||||
{
|
||||
static IosToolchainFactory theIosToolchainFactory;
|
||||
}
|
||||
|
||||
QString DevelopmentTeam::identifier() const
|
||||
{
|
||||
return m_identifier;
|
||||
|
@@ -69,15 +69,6 @@ private:
|
||||
using DevelopmentTeamPtr = std::shared_ptr<DevelopmentTeam>;
|
||||
using DevelopmentTeams = QList<DevelopmentTeamPtr>;
|
||||
|
||||
class IosToolchainFactory : public ProjectExplorer::ToolchainFactory
|
||||
{
|
||||
public:
|
||||
IosToolchainFactory();
|
||||
|
||||
ProjectExplorer::Toolchains autoDetect(
|
||||
const ProjectExplorer::ToolchainDetector &detector) const final;
|
||||
};
|
||||
|
||||
class IosConfigurations : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -123,4 +114,6 @@ private:
|
||||
QDebug &operator<<(QDebug &stream, std::shared_ptr<ProvisioningProfile> profile);
|
||||
QDebug &operator<<(QDebug &stream, std::shared_ptr<DevelopmentTeam> team);
|
||||
|
||||
void setupIosToolchain();
|
||||
|
||||
} // Ios::Internal
|
||||
|
@@ -47,7 +47,6 @@ class IosPluginPrivate
|
||||
public:
|
||||
IosQmakeBuildConfigurationFactory qmakeBuildConfigurationFactory;
|
||||
IosCMakeBuildConfigurationFactory cmakeBuildConfigurationFactory;
|
||||
IosToolchainFactory toolChainFactory;
|
||||
IosRunConfigurationFactory runConfigurationFactory;
|
||||
IosSettingsPage settingsPage;
|
||||
IosQtVersionFactory qtVersionFactory;
|
||||
@@ -76,6 +75,8 @@ class IosPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
qRegisterMetaType<Ios::IosToolHandler::Dict>("Ios::IosToolHandler::Dict");
|
||||
|
||||
setupIosToolchain();
|
||||
|
||||
IosConfigurations::initialize();
|
||||
|
||||
d = new IosPluginPrivate;
|
||||
|
Reference in New Issue
Block a user