1
0
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:
Jim Broadus 2020-06-07 00:24:27 -07:00 committed by John Maguire
parent c299c198de
commit cf8d2004bd

View File

@ -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)),