forked from qt-creator/qt-creator
CMake: Add CMakeConfigurationKitInformation
Add CMakeConfigurationKitInformation and supporting classes. This KitInformation can hold CMake settings that are to be applied for all configurations when this kit is used. It contains e.g. the Qt version and toolchain configured in the kit by default, but can be extended to hold more. The UI will warn if the toolchain or Qt version set up in CMake does not match up with those used by the Kit, but it will allow the user to proceed. Change-Id: I73f06a6535ce14de323130d74af83b9cb2ec0f0f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "cmake_global.h"
|
||||
|
||||
#include "cmakeconfigitem.h"
|
||||
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
|
||||
namespace CMakeProjectManager {
|
||||
@@ -70,4 +72,25 @@ public:
|
||||
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
|
||||
};
|
||||
|
||||
class CMAKE_EXPORT CMakeConfigurationKitInformation : public ProjectExplorer::KitInformation
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CMakeConfigurationKitInformation();
|
||||
|
||||
static CMakeConfig configuration(const ProjectExplorer::Kit *k);
|
||||
static void setConfiguration(ProjectExplorer::Kit *k, const CMakeConfig &config);
|
||||
|
||||
static QStringList toStringList(const ProjectExplorer::Kit *k);
|
||||
static void fromStringList(ProjectExplorer::Kit *k, const QStringList &in);
|
||||
|
||||
// KitInformation interface
|
||||
QVariant defaultValue(const ProjectExplorer::Kit *k) const override;
|
||||
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
|
||||
void setup(ProjectExplorer::Kit *k) override;
|
||||
void fix(ProjectExplorer::Kit *k) override;
|
||||
ItemList toUserOutput(const ProjectExplorer::Kit *k) const override;
|
||||
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
|
||||
};
|
||||
|
||||
} // namespace CMakeProjectManager
|
||||
|
||||
Reference in New Issue
Block a user