Fix mtp device support
This commit is contained in:
@@ -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() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user