summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-10-28 16:10:26 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2011-10-28 16:27:03 +0200
commit2faf3b2548c6dc1e050f1b57087beb82e444fc8f (patch)
treef6e68fc6643fd7e45bd1ff5bc517dcebb03e1cde /src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp
parentc8fc9b33aeebfcb8e718c034ed1d11dd19235619 (diff)
downloadqt-creator-2faf3b2548c6dc1e050f1b57087beb82e444fc8f.tar.gz
SSH: SshRemoteProcessRunner does not need to be a shared pointer.
Change-Id: I49cf2e113d23ebebe0939adbf90a1a88c84998a5 Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp')
-rw-r--r--src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp
index 18c7ba8cdf..a197e380ac 100644
--- a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp
+++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp
@@ -47,11 +47,11 @@ enum State { Inactive, Running };
class RemoteLinuxCustomCommandDeployservicePrivate
{
public:
- RemoteLinuxCustomCommandDeployservicePrivate() : state(Inactive) { }
+ RemoteLinuxCustomCommandDeployservicePrivate() : state(Inactive), runner(0) { }
QString commandLine;
State state;
- SshRemoteProcessRunner::Ptr runner;
+ SshRemoteProcessRunner *runner;
};
} // namespace Internal
@@ -95,12 +95,13 @@ void RemoteLinuxCustomCommandDeployService::doDeploy()
{
QTC_ASSERT(d->state == Inactive, handleDeploymentDone());
- d->runner = SshRemoteProcessRunner::create(connection());
- connect(d->runner.data(), SIGNAL(processOutputAvailable(QByteArray)),
+ delete d->runner;
+ d->runner = new SshRemoteProcessRunner(connection(), this);
+ connect(d->runner, SIGNAL(processOutputAvailable(QByteArray)),
SLOT(handleStdout(QByteArray)));
- connect(d->runner.data(), SIGNAL(processErrorOutputAvailable(QByteArray)),
+ connect(d->runner, SIGNAL(processErrorOutputAvailable(QByteArray)),
SLOT(handleStderr(QByteArray)));
- connect(d->runner.data(), SIGNAL(processClosed(int)), SLOT(handleProcessClosed(int)));
+ connect(d->runner, SIGNAL(processClosed(int)), SLOT(handleProcessClosed(int)));
emit progressMessage(tr("Starting remote command '%1'...").arg(d->commandLine));
d->state = Running;
@@ -111,9 +112,10 @@ void RemoteLinuxCustomCommandDeployService::stopDeployment()
{
QTC_ASSERT(d->state == Running, return);
- disconnect(d->runner.data(), 0, this, 0);
+ disconnect(d->runner, 0, this, 0);
d->runner->process()->closeChannel();
- d->runner = SshRemoteProcessRunner::Ptr();
+ delete d->runner;
+ d->runner = 0;
d->state = Inactive;
handleDeploymentDone();
}