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,12 +569,18 @@ ProvisioningProfilePtr IosConfigurations::provisioningProfile(const QString &pro
|
|||||||
equal(&ProvisioningProfile::identifier, profileID));
|
equal(&ProvisioningProfile::identifier, profileID));
|
||||||
}
|
}
|
||||||
|
|
||||||
IosToolchainFactory::IosToolchainFactory()
|
class IosToolchainFactory final : public ToolchainFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IosToolchainFactory()
|
||||||
{
|
{
|
||||||
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
||||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Toolchains autoDetect(const ToolchainDetector &detector) const final;
|
||||||
|
};
|
||||||
|
|
||||||
Toolchains IosToolchainFactory::autoDetect(const ToolchainDetector &detector) const
|
Toolchains IosToolchainFactory::autoDetect(const ToolchainDetector &detector) const
|
||||||
{
|
{
|
||||||
if (detector.device->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
|
if (detector.device->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
|
||||||
@@ -612,6 +618,11 @@ Toolchains IosToolchainFactory::autoDetect(const ToolchainDetector &detector) co
|
|||||||
return toolChains;
|
return toolChains;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setupIosToolchain()
|
||||||
|
{
|
||||||
|
static IosToolchainFactory theIosToolchainFactory;
|
||||||
|
}
|
||||||
|
|
||||||
QString DevelopmentTeam::identifier() const
|
QString DevelopmentTeam::identifier() const
|
||||||
{
|
{
|
||||||
return m_identifier;
|
return m_identifier;
|
||||||
|
@@ -69,15 +69,6 @@ private:
|
|||||||
using DevelopmentTeamPtr = std::shared_ptr<DevelopmentTeam>;
|
using DevelopmentTeamPtr = std::shared_ptr<DevelopmentTeam>;
|
||||||
using DevelopmentTeams = QList<DevelopmentTeamPtr>;
|
using DevelopmentTeams = QList<DevelopmentTeamPtr>;
|
||||||
|
|
||||||
class IosToolchainFactory : public ProjectExplorer::ToolchainFactory
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
IosToolchainFactory();
|
|
||||||
|
|
||||||
ProjectExplorer::Toolchains autoDetect(
|
|
||||||
const ProjectExplorer::ToolchainDetector &detector) const final;
|
|
||||||
};
|
|
||||||
|
|
||||||
class IosConfigurations : public QObject
|
class IosConfigurations : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -123,4 +114,6 @@ private:
|
|||||||
QDebug &operator<<(QDebug &stream, std::shared_ptr<ProvisioningProfile> profile);
|
QDebug &operator<<(QDebug &stream, std::shared_ptr<ProvisioningProfile> profile);
|
||||||
QDebug &operator<<(QDebug &stream, std::shared_ptr<DevelopmentTeam> team);
|
QDebug &operator<<(QDebug &stream, std::shared_ptr<DevelopmentTeam> team);
|
||||||
|
|
||||||
|
void setupIosToolchain();
|
||||||
|
|
||||||
} // Ios::Internal
|
} // Ios::Internal
|
||||||
|
@@ -47,7 +47,6 @@ class IosPluginPrivate
|
|||||||
public:
|
public:
|
||||||
IosQmakeBuildConfigurationFactory qmakeBuildConfigurationFactory;
|
IosQmakeBuildConfigurationFactory qmakeBuildConfigurationFactory;
|
||||||
IosCMakeBuildConfigurationFactory cmakeBuildConfigurationFactory;
|
IosCMakeBuildConfigurationFactory cmakeBuildConfigurationFactory;
|
||||||
IosToolchainFactory toolChainFactory;
|
|
||||||
IosRunConfigurationFactory runConfigurationFactory;
|
IosRunConfigurationFactory runConfigurationFactory;
|
||||||
IosSettingsPage settingsPage;
|
IosSettingsPage settingsPage;
|
||||||
IosQtVersionFactory qtVersionFactory;
|
IosQtVersionFactory qtVersionFactory;
|
||||||
@@ -76,6 +75,8 @@ class IosPlugin final : public ExtensionSystem::IPlugin
|
|||||||
{
|
{
|
||||||
qRegisterMetaType<Ios::IosToolHandler::Dict>("Ios::IosToolHandler::Dict");
|
qRegisterMetaType<Ios::IosToolHandler::Dict>("Ios::IosToolHandler::Dict");
|
||||||
|
|
||||||
|
setupIosToolchain();
|
||||||
|
|
||||||
IosConfigurations::initialize();
|
IosConfigurations::initialize();
|
||||||
|
|
||||||
d = new IosPluginPrivate;
|
d = new IosPluginPrivate;
|
||||||
|
Reference in New Issue
Block a user