Fix mtp device support

This commit is contained in:
Jonas Kvinge
2019-07-19 19:56:37 +02:00
parent e4cefeaa8f
commit ea6cce7068
14 changed files with 201 additions and 70 deletions

View File

@@ -47,7 +47,7 @@ class DeviceManager;
GPodDevice::GPodDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time)
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time),
loader_thread_(new QThread(this)),
loader_thread_(new QThread()),
loader_(nullptr),
db_(nullptr) {}
@@ -68,7 +68,13 @@ bool GPodDevice::Init() {
}
GPodDevice::~GPodDevice() {}
GPodDevice::~GPodDevice() {
if (loader_) {
loader_thread_->exit();
loader_->deleteLater();
loader_thread_->deleteLater();
}
}
void GPodDevice::ConnectAsync() {