diff options
author | Christian Kandeler <christian.kandeler@nokia.com> | 2011-11-09 14:19:50 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@nokia.com> | 2011-11-09 14:28:49 +0100 |
commit | fd26ab22e9db6075604ffdd7d54ae9b57644590a (patch) | |
tree | 9c39128e3a088fd7baf3584e78b023d12c08405e /src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp | |
parent | f9623b5ad69bbe6700b27f0cd8b6191c70994908 (diff) | |
download | qt-creator-fd26ab22e9db6075604ffdd7d54ae9b57644590a.tar.gz |
SSH: Improve SshRemoteProcessRunner API.
It's silly that we fix the connection parameters in the constructor. A
given object of the class, once created, should be able to repeatedly
run any command with any connection.
Change-Id: Ia45b9d5b6f25c25fb46751cdb47cf81877d8f9a9
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp')
-rw-r--r-- | src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp index a197e380ac..c32ae14e0d 100644 --- a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp +++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp @@ -31,6 +31,8 @@ **************************************************************************/ #include "remotelinuxcustomcommanddeployservice.h" +#include "linuxdeviceconfiguration.h" + #include <utils/qtcassert.h> #include <utils/ssh/sshremoteprocessrunner.h> @@ -95,8 +97,8 @@ void RemoteLinuxCustomCommandDeployService::doDeploy() { QTC_ASSERT(d->state == Inactive, handleDeploymentDone()); - delete d->runner; - d->runner = new SshRemoteProcessRunner(connection(), this); + if (!d->runner) + d->runner = new SshRemoteProcessRunner(this); connect(d->runner, SIGNAL(processOutputAvailable(QByteArray)), SLOT(handleStdout(QByteArray))); connect(d->runner, SIGNAL(processErrorOutputAvailable(QByteArray)), @@ -105,7 +107,7 @@ void RemoteLinuxCustomCommandDeployService::doDeploy() emit progressMessage(tr("Starting remote command '%1'...").arg(d->commandLine)); d->state = Running; - d->runner->run(d->commandLine.toUtf8()); + d->runner->run(d->commandLine.toUtf8(), deviceConfiguration()->sshParameters()); } void RemoteLinuxCustomCommandDeployService::stopDeployment() @@ -114,8 +116,6 @@ void RemoteLinuxCustomCommandDeployService::stopDeployment() disconnect(d->runner, 0, this, 0); d->runner->process()->closeChannel(); - delete d->runner; - d->runner = 0; d->state = Inactive; handleDeploymentDone(); } |