summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-09-23 17:39:33 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2011-09-23 17:49:11 +0200
commit9357b054ae15003ff91e55af7f0d32101cfb75ad (patch)
tree4aadb55298c37680f5ee57abdeee57c190d035fb /src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
parentad9dd78aaa14682e1698aa17a75b64449218ec84 (diff)
downloadqt-creator-9357b054ae15003ff91e55af7f0d32101cfb75ad.tar.gz
RemoteLinux: Add "custom command" deployment step.
It might be useful for developers to run a command before or after uploading or even have a remote command *be* the "deployment" step. Also: Stop trying to display the "deployment possible" state in the widget. It's generally hard to do that correctly and it also interferes with thread safety. Change-Id: I28aaf368a645ee14156a165c606dbc17c3063e82 Reviewed-on: http://codereview.qt-project.org/5469 Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp')
-rw-r--r--src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp b/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
index cd5d05c638..cfc67f81e4 100644
--- a/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
+++ b/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
@@ -33,6 +33,7 @@
#include "genericdirectuploadstep.h"
#include "remotelinuxdeployconfigurationfactory.h"
+#include "remotelinuxcustomcommanddeploymentstep.h"
#include "tarpackagecreationstep.h"
#include "uploadandinstalltarpackagestep.h"
@@ -56,7 +57,7 @@ QStringList GenericRemoteLinuxDeployStepFactory::availableCreationIds(BuildStepL
if (!dc || dc->id() != RemoteLinuxDeployConfigurationFactory::genericDeployConfigurationId())
return ids;
ids << TarPackageCreationStep::stepId() << UploadAndInstallTarPackageStep::stepId()
- << GenericDirectUploadStep::stepId();
+ << GenericDirectUploadStep::stepId() << RemoteLinuxCustomCommandDeploymentStep::stepId();
return ids;
}
@@ -68,6 +69,8 @@ QString GenericRemoteLinuxDeployStepFactory::displayNameForId(const QString &id)
return UploadAndInstallTarPackageStep::displayName();
if (id == GenericDirectUploadStep::stepId())
return GenericDirectUploadStep::displayName();
+ if (id == RemoteLinuxCustomCommandDeploymentStep::stepId())
+ return RemoteLinuxCustomCommandDeploymentStep::stepDisplayName();
return QString();
}
@@ -86,6 +89,8 @@ BuildStep *GenericRemoteLinuxDeployStepFactory::create(BuildStepList *parent, co
return new UploadAndInstallTarPackageStep(parent);
if (id == GenericDirectUploadStep::stepId())
return new GenericDirectUploadStep(parent, GenericDirectUploadStep::stepId());
+ if (id == RemoteLinuxCustomCommandDeploymentStep::stepId())
+ return new RemoteLinuxCustomCommandDeploymentStep(parent);
return 0;
}
@@ -121,6 +126,8 @@ BuildStep *GenericRemoteLinuxDeployStepFactory::clone(BuildStepList *parent, Bui
return new UploadAndInstallTarPackageStep(parent, other);
if (GenericDirectUploadStep * const other = qobject_cast<GenericDirectUploadStep *>(product))
return new GenericDirectUploadStep(parent, other);
+ if (RemoteLinuxCustomCommandDeploymentStep * const other = qobject_cast<RemoteLinuxCustomCommandDeploymentStep *>(product))
+ return new RemoteLinuxCustomCommandDeploymentStep(parent, other);
return 0;
}