mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Revert "Destroy object within appropriate thread"
Temporary solution for #18059
This reverts commit 4f2ac34440.
This commit is contained in:
@@ -269,6 +269,7 @@ TorrentFilesWatcher::~TorrentFilesWatcher()
|
|||||||
{
|
{
|
||||||
m_ioThread->quit();
|
m_ioThread->quit();
|
||||||
m_ioThread->wait();
|
m_ioThread->wait();
|
||||||
|
delete m_asyncWorker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TorrentFilesWatcher::initWorker()
|
void TorrentFilesWatcher::initWorker()
|
||||||
@@ -281,7 +282,6 @@ void TorrentFilesWatcher::initWorker()
|
|||||||
connect(m_asyncWorker, &TorrentFilesWatcher::Worker::torrentFound, this, &TorrentFilesWatcher::onTorrentFound);
|
connect(m_asyncWorker, &TorrentFilesWatcher::Worker::torrentFound, this, &TorrentFilesWatcher::onTorrentFound);
|
||||||
|
|
||||||
m_asyncWorker->moveToThread(m_ioThread);
|
m_asyncWorker->moveToThread(m_ioThread);
|
||||||
connect(m_ioThread, &QThread::finished, m_asyncWorker, &QObject::deleteLater);
|
|
||||||
m_ioThread->start();
|
m_ioThread->start();
|
||||||
|
|
||||||
for (auto it = m_watchedFolders.cbegin(); it != m_watchedFolders.cend(); ++it)
|
for (auto it = m_watchedFolders.cbegin(); it != m_watchedFolders.cend(); ++it)
|
||||||
|
|||||||
Reference in New Issue
Block a user