Cleanup Bluetooth local device and the discovery agent on exit

Do some extra cleanup when the BtDeviceSelectionDialog is
destroyed.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Claudiu Olteanu 2015-08-18 20:11:25 +03:00 committed by Dirk Hohndel
parent 118e978b5a
commit 9f043f4a93

View file

@ -61,6 +61,15 @@ BtDeviceSelectionDialog::BtDeviceSelectionDialog(QWidget *parent) :
BtDeviceSelectionDialog::~BtDeviceSelectionDialog()
{
delete ui;
// Clean the local device
delete localDevice;
// Clean the device discovery agent
if (remoteDeviceDiscoveryAgent->isActive())
remoteDeviceDiscoveryAgent->stop();
delete remoteDeviceDiscoveryAgent;
}
void BtDeviceSelectionDialog::on_changeDeviceState_clicked()