diff --git a/src/base/torrentfileswatcher.cpp b/src/base/torrentfileswatcher.cpp index 6a84f58b9..2af5cd276 100644 --- a/src/base/torrentfileswatcher.cpp +++ b/src/base/torrentfileswatcher.cpp @@ -163,7 +163,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, this, [this] { delete m_asyncWorker; }); + connect(m_ioThread.get(), &QObject::destroyed, this, [this] { delete m_asyncWorker; }); m_ioThread->start(); for (auto it = m_watchedFolders.cbegin(); it != m_watchedFolders.cend(); ++it) diff --git a/src/gui/lineedit.cpp b/src/gui/lineedit.cpp index b6ad0af76..f388fab60 100644 --- a/src/gui/lineedit.cpp +++ b/src/gui/lineedit.cpp @@ -38,7 +38,7 @@ LineEdit::LineEdit(QWidget *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); setClearButtonEnabled(true);