aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/deployconfiguration.h
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-01-18 11:22:48 +0100
committerhjk <hjk@qt.io>2019-01-21 12:00:44 +0000
commit910496130cfc3d68ff6b7ae992f8cffe6d49b6da (patch)
treef573a8e41ced335f13291841337f310b9af5821c /src/plugins/projectexplorer/deployconfiguration.h
parent73ac3b928cadecfe9e44d71ff5bc1591bbcd2a4a (diff)
ProjectExplorer: Add a mechanism to specify initial steps
... in a deploy configuration. The idea is to replace DeployConfiguration-derived::initialize() functions by that. This can also be used to cut link-time ties of "derived plugins" by using step ids instead of creation of real class instances when specifying deploy config contents. Change-Id: Id7c613b054e37fe5d03463b9b0aa7dfef44a8e13 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/deployconfiguration.h')
-rw-r--r--src/plugins/projectexplorer/deployconfiguration.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/deployconfiguration.h b/src/plugins/projectexplorer/deployconfiguration.h
index 8f2ea2bb407..5cf1ab0dcb1 100644
--- a/src/plugins/projectexplorer/deployconfiguration.h
+++ b/src/plugins/projectexplorer/deployconfiguration.h
@@ -96,6 +96,9 @@ public:
void setDefaultDisplayName(const QString &defaultDisplayName);
void setSupportedProjectType(Core::Id id);
+ // Step is only added if condition is not set, or returns true when called.
+ void addInitialStep(Core::Id stepId, const std::function<bool(Target *)> &condition = {});
+
virtual bool canHandle(ProjectExplorer::Target *target) const;
protected:
@@ -113,10 +116,15 @@ protected:
}
private:
+ struct DeployStepCreationInfo {
+ Core::Id deployStepId;
+ std::function<bool(Target *)> condition; // unset counts as unrestricted
+ };
DeployConfigurationCreator m_creator;
Core::Id m_deployConfigBaseId;
Core::Id m_supportedProjectType;
QList<Core::Id> m_supportedTargetDeviceTypes;
+ QList<DeployStepCreationInfo> m_initialSteps;
QString m_defaultDisplayName;
};