blob: 06e09ca6b32fb98f643ef6ea3e2a7e8997244270 (
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
44
45
46
47
48
49
50
51
52
53
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <QList>
#include <QVariant>
namespace ProjectExplorer { class Kit; }
namespace QbsProjectManager {
namespace Internal {
QString toJSLiteral(const QVariant &val);
QVariant fromJSLiteral(const QString &str);
class QbsProfileManager : public QObject
{
Q_OBJECT
public:
QbsProfileManager();
~QbsProfileManager() override;
static QbsProfileManager *instance();
static QString ensureProfileForKit(const ProjectExplorer::Kit *k);
static QString profileNameForKit(const ProjectExplorer::Kit *kit);
static void updateProfileIfNecessary(const ProjectExplorer::Kit *kit);
enum class QbsConfigOp { Get, Set, Unset, AddProfile };
static QString runQbsConfig(
const ProjectExplorer::IDeviceConstPtr &device,
QbsConfigOp op,
const QString &key,
const QVariant &value = {});
signals:
void qbsProfilesUpdated();
private:
void addProfileFromKit(const ProjectExplorer::Kit *k);
void updateAllProfiles();
void handleKitUpdate(ProjectExplorer::Kit *kit);
void handleKitRemoval(ProjectExplorer::Kit *kit);
QList<ProjectExplorer::Kit *> m_kitsToBeSetupForQbs;
};
} // namespace Internal
} // namespace QbsProjectManager
|