forked from qt-creator/qt-creator
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:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user