forked from qt-creator/qt-creator
iOS: Move build configuration factory definitions to .cpp
Change-Id: Ia4a52e61488900fca013a50185ae534faa8816eb Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -11,9 +11,11 @@
|
|||||||
#include <projectexplorer/namedwidget.h>
|
#include <projectexplorer/namedwidget.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
|
#include <cmakeprojectmanager/cmakebuildconfiguration.h>
|
||||||
#include <cmakeprojectmanager/cmakeprojectconstants.h>
|
#include <cmakeprojectmanager/cmakeprojectconstants.h>
|
||||||
|
|
||||||
#include <qmakeprojectmanager/qmakebuildinfo.h>
|
#include <qmakeprojectmanager/qmakebuildinfo.h>
|
||||||
|
#include <qmakeprojectmanager/qmakebuildconfiguration.h>
|
||||||
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
|
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
@@ -31,8 +33,7 @@ using namespace CMakeProjectManager;
|
|||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace Ios {
|
namespace Ios::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
static Q_LOGGING_CATEGORY(iosSettingsLog, "qtc.ios.common", QtWarningMsg)
|
static Q_LOGGING_CATEGORY(iosSettingsLog, "qtc.ios.common", QtWarningMsg)
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ const char autoManagedSigningKey[] = "Ios.AutoManagedSigning";
|
|||||||
|
|
||||||
const int IdentifierRole = Qt::UserRole+1;
|
const int IdentifierRole = Qt::UserRole+1;
|
||||||
|
|
||||||
class IosSigningSettingsWidget : public NamedWidget
|
class IosSigningSettingsWidget final : public NamedWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit IosSigningSettingsWidget(BuildConfiguration *buildConfiguration,
|
explicit IosSigningSettingsWidget(BuildConfiguration *buildConfiguration,
|
||||||
@@ -369,14 +370,14 @@ void IosSigningSettingsWidget::updateWarningText()
|
|||||||
|
|
||||||
// IosQmakeBuildConfiguration
|
// IosQmakeBuildConfiguration
|
||||||
|
|
||||||
class IosQmakeBuildConfiguration : public QmakeProjectManager::QmakeBuildConfiguration
|
class IosQmakeBuildConfiguration final : public QmakeBuildConfiguration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IosQmakeBuildConfiguration(Target *target, Id id);
|
IosQmakeBuildConfiguration(Target *target, Id id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<NamedWidget *> createSubConfigWidgets() override;
|
QList<NamedWidget *> createSubConfigWidgets() final;
|
||||||
void fromMap(const Store &map) override;
|
void fromMap(const Store &map) final;
|
||||||
|
|
||||||
void updateQmakeCommand();
|
void updateQmakeCommand();
|
||||||
|
|
||||||
@@ -471,23 +472,28 @@ void IosQmakeBuildConfiguration::updateQmakeCommand()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IosQmakeBuildConfigurationFactory::IosQmakeBuildConfigurationFactory()
|
class IosQmakeBuildConfigurationFactory final : public QmakeBuildConfigurationFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IosQmakeBuildConfigurationFactory()
|
||||||
{
|
{
|
||||||
registerBuildConfiguration<IosQmakeBuildConfiguration>(
|
registerBuildConfiguration<IosQmakeBuildConfiguration>(
|
||||||
QmakeProjectManager::Constants::QMAKE_BC_ID);
|
QmakeProjectManager::Constants::QMAKE_BC_ID);
|
||||||
addSupportedTargetDeviceType(Constants::IOS_DEVICE_TYPE);
|
addSupportedTargetDeviceType(Constants::IOS_DEVICE_TYPE);
|
||||||
addSupportedTargetDeviceType(Constants::IOS_SIMULATOR_TYPE);
|
addSupportedTargetDeviceType(Constants::IOS_SIMULATOR_TYPE);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// IosCMakeBuildConfiguration
|
// IosCMakeBuildConfiguration
|
||||||
|
|
||||||
class IosCMakeBuildConfiguration : public CMakeProjectManager::CMakeBuildConfiguration
|
class IosCMakeBuildConfiguration final : public CMakeBuildConfiguration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IosCMakeBuildConfiguration(Target *target, Id id);
|
IosCMakeBuildConfiguration(Target *target, Id id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<NamedWidget *> createSubConfigWidgets() override;
|
QList<NamedWidget *> createSubConfigWidgets() final;
|
||||||
|
|
||||||
CMakeProjectManager::CMakeConfig signingFlags() const final;
|
CMakeProjectManager::CMakeConfig signingFlags() const final;
|
||||||
|
|
||||||
@@ -548,13 +554,24 @@ CMakeConfig IosCMakeBuildConfiguration::signingFlags() const
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
IosCMakeBuildConfigurationFactory::IosCMakeBuildConfigurationFactory()
|
class IosCMakeBuildConfigurationFactory final : public CMakeBuildConfigurationFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IosCMakeBuildConfigurationFactory()
|
||||||
{
|
{
|
||||||
registerBuildConfiguration<IosCMakeBuildConfiguration>(
|
registerBuildConfiguration<IosCMakeBuildConfiguration>(
|
||||||
CMakeProjectManager::Constants::CMAKE_BUILDCONFIGURATION_ID);
|
CMakeProjectManager::Constants::CMAKE_BUILDCONFIGURATION_ID);
|
||||||
addSupportedTargetDeviceType(Constants::IOS_DEVICE_TYPE);
|
addSupportedTargetDeviceType(Constants::IOS_DEVICE_TYPE);
|
||||||
addSupportedTargetDeviceType(Constants::IOS_SIMULATOR_TYPE);
|
addSupportedTargetDeviceType(Constants::IOS_SIMULATOR_TYPE);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
// Factories
|
||||||
} // namespace Ios
|
|
||||||
|
void setupIosBuildConfiguration()
|
||||||
|
{
|
||||||
|
static IosQmakeBuildConfigurationFactory theIosQmakeBuildConfigurationFactory;
|
||||||
|
static IosCMakeBuildConfigurationFactory theIosCMakeBuildConfigurationFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // Ios::Internal
|
||||||
|
|||||||
@@ -3,21 +3,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <qmakeprojectmanager/qmakebuildconfiguration.h>
|
|
||||||
#include <cmakeprojectmanager/cmakebuildconfiguration.h>
|
|
||||||
|
|
||||||
namespace Ios::Internal {
|
namespace Ios::Internal {
|
||||||
|
|
||||||
class IosQmakeBuildConfigurationFactory : public QmakeProjectManager::QmakeBuildConfigurationFactory
|
void setupIosBuildConfiguration();
|
||||||
{
|
|
||||||
public:
|
|
||||||
IosQmakeBuildConfigurationFactory();
|
|
||||||
};
|
|
||||||
|
|
||||||
class IosCMakeBuildConfigurationFactory : public CMakeProjectManager::CMakeBuildConfigurationFactory
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
IosCMakeBuildConfigurationFactory();
|
|
||||||
};
|
|
||||||
|
|
||||||
} // Ios::Internal
|
} // Ios::Internal
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ public:
|
|||||||
class IosPluginPrivate
|
class IosPluginPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IosQmakeBuildConfigurationFactory qmakeBuildConfigurationFactory;
|
|
||||||
IosCMakeBuildConfigurationFactory cmakeBuildConfigurationFactory;
|
|
||||||
IosRunConfigurationFactory runConfigurationFactory;
|
IosRunConfigurationFactory runConfigurationFactory;
|
||||||
IosSettingsPage settingsPage;
|
IosSettingsPage settingsPage;
|
||||||
IosQtVersionFactory qtVersionFactory;
|
IosQtVersionFactory qtVersionFactory;
|
||||||
@@ -76,6 +74,7 @@ class IosPlugin final : public ExtensionSystem::IPlugin
|
|||||||
qRegisterMetaType<Ios::IosToolHandler::Dict>("Ios::IosToolHandler::Dict");
|
qRegisterMetaType<Ios::IosToolHandler::Dict>("Ios::IosToolHandler::Dict");
|
||||||
|
|
||||||
setupIosToolchain();
|
setupIosToolchain();
|
||||||
|
setupIosBuildConfiguration();
|
||||||
|
|
||||||
IosConfigurations::initialize();
|
IosConfigurations::initialize();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user