Add signing options to CMake/iOS build configuration

Adds the signing settings to iOS configurations.
Adds placeholders for signing flags to the initial CMake arguments, and
updates the CMake configuration when signing settings change.

The new configuration doesn't get automatically applied. Only the "Apply
Configuration Changes" button gets enabled and the user has to press
that explicitly. This seems to be a more general issue affecting the QML
debugging setting too, though.

Task-number: QTCREATORBUG-23574
Change-Id: I3e8d45f565347e1ad2ac274a21b1552f1510e8f4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2021-02-04 14:53:42 +01:00
parent 865d87a75f
commit 9bd8dc41d2
12 changed files with 290 additions and 103 deletions

View File

@@ -25,6 +25,7 @@
#pragma once
#include "cmake_global.h"
#include "cmakeconfigitem.h"
#include "configmodel.h"
@@ -38,16 +39,18 @@ namespace Internal {
class CMakeBuildSystem;
class CMakeBuildSettingsWidget;
class CMakeProjectImporter;
class CMakeBuildConfiguration final : public ProjectExplorer::BuildConfiguration
} // namespace Internal
class CMAKE_EXPORT CMakeBuildConfiguration : public ProjectExplorer::BuildConfiguration
{
Q_OBJECT
friend class ProjectExplorer::BuildConfigurationFactory;
CMakeBuildConfiguration(ProjectExplorer::Target *target, Utils::Id id);
~CMakeBuildConfiguration() final;
public:
CMakeBuildConfiguration(ProjectExplorer::Target *target, Utils::Id id);
~CMakeBuildConfiguration() override;
CMakeConfig configurationFromCMake() const;
QStringList extraCMakeArguments() const;
@@ -76,6 +79,10 @@ public:
signals:
void errorOccurred(const QString &message);
void warningOccurred(const QString &message);
void signingFlagsChanged();
protected:
bool fromMap(const QVariantMap &map) override;
private:
QVariantMap toMap() const override;
@@ -83,7 +90,7 @@ private:
ProjectExplorer::NamedWidget *createConfigWidget() override;
bool fromMap(const QVariantMap &map) override;
virtual CMakeConfig signingFlags() const;
enum ForceEnabledChanged { False, True };
void clearError(ForceEnabledChanged fec = ForceEnabledChanged::False);
@@ -101,17 +108,16 @@ private:
QString m_warning;
CMakeConfig m_configurationFromCMake;
CMakeBuildSystem *m_buildSystem = nullptr;
Internal::CMakeBuildSystem *m_buildSystem = nullptr;
QStringList m_extraCMakeArguments;
friend class CMakeBuildSettingsWidget;
friend class CMakeBuildSystem;
friend class Internal::CMakeBuildSettingsWidget;
friend class Internal::CMakeBuildSystem;
};
class CMakeProjectImporter;
class CMakeBuildConfigurationFactory final : public ProjectExplorer::BuildConfigurationFactory
class CMAKE_EXPORT CMakeBuildConfigurationFactory
: public ProjectExplorer::BuildConfigurationFactory
{
public:
CMakeBuildConfigurationFactory();
@@ -128,9 +134,11 @@ public:
private:
static ProjectExplorer::BuildInfo createBuildInfo(BuildType buildType);
friend class CMakeProjectImporter;
friend class Internal::CMakeProjectImporter;
};
namespace Internal {
class InitialCMakeArgumentsAspect final : public Utils::StringAspect
{
Q_OBJECT
@@ -155,6 +163,5 @@ public:
BuildTypeAspect();
};
} // namespace Internal
} // namespace CMakeProjectManager