Commit b9d10dd0 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

ProjectExplorer: Add deployConfiguration() member function to BuildStep.

parent a8f737c7
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "buildconfiguration.h" #include "buildconfiguration.h"
#include "buildsteplist.h" #include "buildsteplist.h"
#include "deployconfiguration.h"
#include "target.h" #include "target.h"
using namespace ProjectExplorer; using namespace ProjectExplorer;
...@@ -63,6 +64,14 @@ BuildConfiguration *BuildStep::buildConfiguration() const ...@@ -63,6 +64,14 @@ BuildConfiguration *BuildStep::buildConfiguration() const
return bc; return bc;
} }
DeployConfiguration *BuildStep::deployConfiguration() const
{
DeployConfiguration *dc = qobject_cast<DeployConfiguration *>(parent()->parent());
if (!dc)
dc = target()->activeDeployConfiguration();
return dc;
}
Target *BuildStep::target() const Target *BuildStep::target() const
{ {
return qobject_cast<Target *>(parent()->parent()->parent()); return qobject_cast<Target *>(parent()->parent()->parent());
......
...@@ -45,6 +45,7 @@ namespace ProjectExplorer { ...@@ -45,6 +45,7 @@ namespace ProjectExplorer {
class BuildConfiguration; class BuildConfiguration;
class BuildStepList; class BuildStepList;
class DeployConfiguration;
class Target; class Target;
/* /*
...@@ -101,6 +102,7 @@ public: ...@@ -101,6 +102,7 @@ public:
virtual bool immutable() const; virtual bool immutable() const;
BuildConfiguration *buildConfiguration() const; BuildConfiguration *buildConfiguration() const;
DeployConfiguration *deployConfiguration() const;
Target *target() const; Target *target() const;
enum OutputFormat { NormalOutput, ErrorOutput, MessageOutput, ErrorMessageOutput }; enum OutputFormat { NormalOutput, ErrorOutput, MessageOutput, ErrorMessageOutput };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment