mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 11:35:24 +01:00
Use deleteLater to destroy device backends
This commit is contained in:
parent
c299c198de
commit
cf8d2004bd
@ -44,7 +44,8 @@ ConnectedDevice::ConnectedDevice(const QUrl& url, DeviceLister* lister,
|
|||||||
qLog(Info) << "connected" << url << unique_id << first_time;
|
qLog(Info) << "connected" << url << unique_id << first_time;
|
||||||
|
|
||||||
// Create the backend in the database thread.
|
// Create the backend in the database thread.
|
||||||
backend_.reset(new LibraryBackend(), [](QObject* obj) { delete obj; });
|
backend_.reset(new LibraryBackend(),
|
||||||
|
[](QObject* obj) { obj->deleteLater(); });
|
||||||
backend_->moveToThread(app_->database()->thread());
|
backend_->moveToThread(app_->database()->thread());
|
||||||
|
|
||||||
connect(backend_.get(), SIGNAL(TotalSongCountUpdated(int)),
|
connect(backend_.get(), SIGNAL(TotalSongCountUpdated(int)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user