mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
committed by
GitHub
parent
006ad23d0d
commit
11efd26acc
@@ -138,7 +138,7 @@ TorrentFilesWatcher *TorrentFilesWatcher::instance()
|
||||
}
|
||||
|
||||
TorrentFilesWatcher::TorrentFilesWatcher(QObject *parent)
|
||||
: QObject {parent}
|
||||
: QObject(parent)
|
||||
, m_ioThread {new QThread}
|
||||
{
|
||||
const auto *btSession = BitTorrent::Session::instance();
|
||||
@@ -159,7 +159,7 @@ void TorrentFilesWatcher::initWorker()
|
||||
connect(m_asyncWorker, &TorrentFilesWatcher::Worker::torrentFound, this, &TorrentFilesWatcher::onTorrentFound);
|
||||
|
||||
m_asyncWorker->moveToThread(m_ioThread.get());
|
||||
connect(m_ioThread.get(), &QThread::finished, m_asyncWorker, &QObject::deleteLater);
|
||||
connect(m_ioThread.get(), &QThread::finished, this, [this] { delete m_asyncWorker; });
|
||||
m_ioThread->start();
|
||||
|
||||
for (auto it = m_watchedFolders.cbegin(); it != m_watchedFolders.cend(); ++it)
|
||||
|
||||
Reference in New Issue
Block a user