mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-28 10:48:19 +03:00
Fix memory leaks
Fixes a couple of memory leaks (although not dangerous in practice, since we are talking about objects with a lifetime up to the end of the application) PR #19650. Closes #19632.
This commit is contained in:
parent
7512b92a36
commit
d877215018
2 changed files with 2 additions and 2 deletions
|
@ -163,7 +163,7 @@ 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.get());
|
m_asyncWorker->moveToThread(m_ioThread.get());
|
||||||
connect(m_ioThread.get(), &QThread::finished, this, [this] { delete m_asyncWorker; });
|
connect(m_ioThread.get(), &QObject::destroyed, this, [this] { delete m_asyncWorker; });
|
||||||
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)
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
LineEdit::LineEdit(QWidget *parent)
|
LineEdit::LineEdit(QWidget *parent)
|
||||||
: QLineEdit(parent)
|
: QLineEdit(parent)
|
||||||
{
|
{
|
||||||
auto *action = new QAction(UIThemeManager::instance()->getIcon(u"edit-find"_s), QString());
|
auto *action = new QAction(UIThemeManager::instance()->getIcon(u"edit-find"_s), QString(), this);
|
||||||
addAction(action, QLineEdit::LeadingPosition);
|
addAction(action, QLineEdit::LeadingPosition);
|
||||||
|
|
||||||
setClearButtonEnabled(true);
|
setClearButtonEnabled(true);
|
||||||
|
|
Loading…
Reference in a new issue