From ec7dfee887d051b40609aeabb1c5f3bae99e8fc4 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 15 Jul 2018 10:19:24 +0800 Subject: [PATCH 1/2] Fix typo --- src/base/bittorrent/session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index a39fc748b..861017b65 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -3506,7 +3506,7 @@ void Session::setMaxRatioAction(MaxRatioAction act) } // If this functions returns true, we cannot add torrent to session, -// but it is still possible to merge trackers in some case +// but it is still possible to merge trackers in some cases bool Session::isKnownTorrent(const InfoHash &hash) const { return (m_torrents.contains(hash) From 1b406c97da5406639400fccb279b7ada1a3849df Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 15 Jul 2018 10:31:21 +0800 Subject: [PATCH 2/2] Revise dialog messages Using critical dialog is a bit too strong as qbt didn't actually run into something that fails, so downgrade to warning dialog. --- src/gui/addnewtorrentdialog.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index 28ce94485..25727fc66 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -296,16 +296,16 @@ bool AddNewTorrentDialog::loadTorrent(const QString &torrentPath) BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(m_hash); if (torrent) { if (torrent->isPrivate() || m_torrentInfo.isPrivate()) { - RaisedMessageBox::critical(this, tr("Already in the download list"), tr("Torrent '%1' is already in the download list. Trackers weren't merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok); + RaisedMessageBox::warning(this, tr("Torrent is already present"), tr("Torrent '%1' is already in the transfer list. Trackers haven't been merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok); } else { torrent->addTrackers(m_torrentInfo.trackers()); torrent->addUrlSeeds(m_torrentInfo.urlSeeds()); - RaisedMessageBox::information(this, tr("Already in the download list"), tr("Torrent '%1' is already in the download list. Trackers were merged.").arg(torrent->name()), QMessageBox::Ok); + RaisedMessageBox::information(this, tr("Torrent is already present"), tr("Torrent '%1' is already in the transfer list. Trackers have been merged.").arg(torrent->name()), QMessageBox::Ok); } } else { - RaisedMessageBox::critical(this, tr("Cannot add torrent"), tr("Cannot add this torrent. Perhaps it is already in adding state."), QMessageBox::Ok); + RaisedMessageBox::information(this, tr("Torrent is already present"), tr("Torrent is already queued for processing."), QMessageBox::Ok); } return false; } @@ -330,16 +330,16 @@ bool AddNewTorrentDialog::loadMagnet(const BitTorrent::MagnetUri &magnetUri) BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(m_hash); if (torrent) { if (torrent->isPrivate()) { - RaisedMessageBox::critical(this, tr("Already in the download list"), tr("Torrent '%1' is already in the download list. Trackers weren't merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok); + RaisedMessageBox::warning(this, tr("Torrent is already present"), tr("Torrent '%1' is already in the transfer list. Trackers haven't been merged because it is a private torrent.").arg(torrent->name()), QMessageBox::Ok); } else { torrent->addTrackers(magnetUri.trackers()); torrent->addUrlSeeds(magnetUri.urlSeeds()); - RaisedMessageBox::information(this, tr("Already in the download list"), tr("Magnet link '%1' is already in the download list. Trackers were merged.").arg(torrent->name()), QMessageBox::Ok); + RaisedMessageBox::information(this, tr("Torrent is already present"), tr("Magnet link '%1' is already in the transfer list. Trackers have been merged.").arg(torrent->name()), QMessageBox::Ok); } } else { - RaisedMessageBox::critical(this, tr("Cannot add torrent"), tr("Cannot add this torrent. Perhaps it is already in adding."), QMessageBox::Ok); + RaisedMessageBox::information(this, tr("Torrent is already present"), tr("Magnet link is already queued for processing."), QMessageBox::Ok); } return false; }