SSH: Add parent object to SshConnection constructor.

There's no mandatory use of shared pointers anymore, so client code
should be able to make use of QObject-based ownership.

Change-Id: I2344ca66a40c310ef739b32502eb8471da98c03a
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Christian Kandeler
2012-06-08 08:48:03 +02:00
parent 92c7dce14f
commit c310f1671c
4 changed files with 5 additions and 8 deletions

View File

@@ -76,8 +76,6 @@ GenericLinuxDeviceTester::GenericLinuxDeviceTester(QObject *parent)
GenericLinuxDeviceTester::~GenericLinuxDeviceTester()
{
if (d->connection)
d->connection->deleteLater();
delete d;
}
@@ -86,7 +84,7 @@ void GenericLinuxDeviceTester::testDevice(const LinuxDeviceConfiguration::ConstP
QTC_ASSERT(d->state == Inactive, return);
d->deviceConfiguration = deviceConfiguration;
d->connection = new SshConnection(deviceConfiguration->sshParameters());
d->connection = new SshConnection(deviceConfiguration->sshParameters(), this);
connect(d->connection, SIGNAL(connected()), SLOT(handleConnected()));
connect(d->connection, SIGNAL(error(QSsh::SshError)),
SLOT(handleConnectionFailure()));