blob: a91596a0d3fc8a74fff37e53bf199559f3dec23f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Copyright (C) 2020 Alexis Jeandet.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include "exewrappers/mesontools.h"
#include <projectexplorer/kit.h>
#include <projectexplorer/kitmanager.h>
namespace MesonProjectManager {
namespace Internal {
class MesonToolKitAspect final : public ProjectExplorer::KitAspect
{
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::MesonToolKitAspect)
public:
MesonToolKitAspect();
ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *k) const final;
void setup(ProjectExplorer::Kit *k) final;
void fix(ProjectExplorer::Kit *k) final;
ItemList toUserOutput(const ProjectExplorer::Kit *k) const final;
ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *) const final;
static void setMesonTool(ProjectExplorer::Kit *kit, Utils::Id id);
static Utils::Id mesonToolId(const ProjectExplorer::Kit *kit);
static inline decltype(auto) mesonTool(const ProjectExplorer::Kit *kit)
{
return MesonTools::mesonWrapper(MesonToolKitAspect::mesonToolId(kit));
}
static inline bool isValid(const ProjectExplorer::Kit *kit)
{
auto tool = mesonTool(kit);
return (tool && tool->isValid());
}
};
} // namespace Internal
} // namespace MesonProjectManager
|