mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06:00
Propagate error messages from search engine
This will be useful for development and debugging issues. The messages will be outputted to both console and qbt logger. Note that having stderr messages does not always mean the operation failed but there might be some (non-fatal) issues. PR #23293. Closes #6553. Closes #22381. Closes #23052.
This commit is contained in:
@@ -114,8 +114,8 @@ void SearchController::startAction()
|
||||
|
||||
const auto id = generateSearchId();
|
||||
const std::shared_ptr<SearchHandler> searchHandler {SearchPluginManager::instance()->startSearch(pattern, category, pluginsToUse)};
|
||||
QObject::connect(searchHandler.get(), &SearchHandler::searchFinished, this, [id, this]() { m_activeSearches.remove(id); });
|
||||
QObject::connect(searchHandler.get(), &SearchHandler::searchFailed, this, [id, this]() { m_activeSearches.remove(id); });
|
||||
connect(searchHandler.get(), &SearchHandler::searchFinished, this, [this, id] { m_activeSearches.remove(id); });
|
||||
connect(searchHandler.get(), &SearchHandler::searchFailed, this, [this, id]([[maybe_unused]] const QString &errorMessage) { m_activeSearches.remove(id); });
|
||||
|
||||
m_searchHandlers.insert(id, searchHandler);
|
||||
|
||||
@@ -235,8 +235,8 @@ void SearchController::downloadTorrentAction()
|
||||
else
|
||||
{
|
||||
SearchDownloadHandler *downloadHandler = SearchPluginManager::instance()->downloadTorrent(pluginName, torrentUrl);
|
||||
connect(downloadHandler, &SearchDownloadHandler::downloadFinished
|
||||
, this, [this, downloadHandler](const QString &source)
|
||||
connect(downloadHandler, &SearchDownloadHandler::downloadFinished, this
|
||||
, [this, downloadHandler](const QString &source, [[maybe_unused]] const QString &errorMessage)
|
||||
{
|
||||
app()->addTorrentManager()->addTorrent(source);
|
||||
downloadHandler->deleteLater();
|
||||
|
||||
Reference in New Issue
Block a user