Fixes to imobiledeviceconnection support

This commit is contained in:
Jonas Kvinge
2020-05-29 17:36:01 +02:00
parent 823f65f1ca
commit 6c77294a86
15 changed files with 91 additions and 51 deletions

View File

@@ -46,7 +46,7 @@
class DeviceLister;
class DeviceManager;
GPodDevice::GPodDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time)
GPodDevice::GPodDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time)
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time),
loader_(nullptr),
loader_thread_(nullptr),
@@ -72,11 +72,15 @@ bool GPodDevice::Init() {
}
GPodDevice::~GPodDevice() {
if (loader_) {
loader_thread_->exit();
loader_->deleteLater();
loader_thread_->deleteLater();
loader_ = nullptr;
loader_thread_ = nullptr;
}
}
void GPodDevice::ConnectAsync() {