diff options
author | Claudiu Olteanu <olteanu.claudiu@ymail.com> | 2015-08-18 20:11:25 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-20 22:45:04 -0700 |
commit | 9f043f4a933485de8dccff0e0d50fd0666b1af38 (patch) | |
tree | a7914e4c0dddc392b79abe957ca3c3a76118f377 | |
parent | 118e978b5a3cd4b011d0e557bb5a550d75c3c8d7 (diff) | |
download | subsurface-9f043f4a933485de8dccff0e0d50fd0666b1af38.tar.gz |
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>
-rw-r--r-- | qt-ui/btdeviceselectiondialog.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/btdeviceselectiondialog.cpp b/qt-ui/btdeviceselectiondialog.cpp index 007fe940e..ce759ccba 100644 --- a/qt-ui/btdeviceselectiondialog.cpp +++ b/qt-ui/btdeviceselectiondialog.cpp @@ -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() |