Improve add torrent error handling

PR #22468.
This commit is contained in:
Vladimir Golovnev 2025-03-25 09:13:15 +03:00 committed by GitHub
parent 8c8a0ac54c
commit 4bd50672e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 78 additions and 14 deletions

View file

@ -929,10 +929,10 @@ int Application::exec()
m_desktopIntegration->showNotification(tr("Torrent added"), tr("'%1' was added.", "e.g: xxx.avi was added.").arg(torrent->name()));
});
connect(m_addTorrentManager, &AddTorrentManager::addTorrentFailed, this
, [this](const QString &source, const QString &reason)
, [this](const QString &source, const BitTorrent::AddTorrentError &reason)
{
m_desktopIntegration->showNotification(tr("Add torrent failed")
, tr("Couldn't add torrent '%1', reason: %2.").arg(source, reason));
, tr("Couldn't add torrent '%1', reason: %2.").arg(source, reason.message));
});
disconnect(m_desktopIntegration, &DesktopIntegration::activationRequested, this, &Application::createStartupProgressDialog);