summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/deployconfiguration.cpp
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@nokia.com>2012-09-12 17:38:08 +0200
committerDaniel Teske <daniel.teske@digia.com>2012-09-28 10:51:59 +0200
commitd7993c717d08e2884963340d9017156b54b44c05 (patch)
treed1ce734d12d6c1fe30a893f91756b4fbffaa7006 /src/plugins/projectexplorer/deployconfiguration.cpp
parenta969c9c1d81f8b17755be56c6ce9dc730438912f (diff)
downloadqt-creator-d7993c717d08e2884963340d9017156b54b44c05.tar.gz
Make DeployConfigurations cloneable
The API was there just not the correct implementation. Change-Id: I65468f3c00f3c8ba1b853f8c11f6296813d1a966 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/projectexplorer/deployconfiguration.cpp')
-rw-r--r--src/plugins/projectexplorer/deployconfiguration.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/plugins/projectexplorer/deployconfiguration.cpp b/src/plugins/projectexplorer/deployconfiguration.cpp
index 2be157dd8c..f5db9d320b 100644
--- a/src/plugins/projectexplorer/deployconfiguration.cpp
+++ b/src/plugins/projectexplorer/deployconfiguration.cpp
@@ -151,6 +151,21 @@ void DeployConfiguration::cloneSteps(DeployConfiguration *source)
}
///
+// DefaultDeployConfiguration
+///
+DefaultDeployConfiguration::DefaultDeployConfiguration(Target *target, const Core::Id id)
+ : DeployConfiguration(target, id)
+{
+
+}
+
+DefaultDeployConfiguration::DefaultDeployConfiguration(Target *target, DeployConfiguration *source)
+ : DeployConfiguration(target, source)
+{
+ cloneSteps(source);
+}
+
+///
// DeployConfigurationFactory
///
@@ -187,7 +202,7 @@ DeployConfiguration *DeployConfigurationFactory::create(Target *parent, const Co
{
if (!canCreate(parent, id))
return 0;
- return new DeployConfiguration(parent, id);
+ return new DefaultDeployConfiguration(parent, id);
}
bool DeployConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
@@ -199,7 +214,7 @@ DeployConfiguration *DeployConfigurationFactory::restore(Target *parent, const Q
{
if (!canRestore(parent, map))
return 0;
- DeployConfiguration *dc = new DeployConfiguration(parent, idFromMap(map));
+ DefaultDeployConfiguration *dc = new DefaultDeployConfiguration(parent, idFromMap(map));
if (!dc->fromMap(map)) {
delete dc;
return 0;
@@ -216,7 +231,7 @@ DeployConfiguration *DeployConfigurationFactory::clone(Target *parent, DeployCon
{
if (!canClone(parent, product))
return 0;
- return new DeployConfiguration(parent, product);
+ return new DefaultDeployConfiguration(parent, product);
}
DeployConfigurationFactory *DeployConfigurationFactory::find(Target *parent, const QVariantMap &map)