diff --git a/src/core/bittorrent/torrenthandle.cpp b/src/core/bittorrent/torrenthandle.cpp index 5d4064328..17e26c638 100644 --- a/src/core/bittorrent/torrenthandle.cpp +++ b/src/core/bittorrent/torrenthandle.cpp @@ -109,6 +109,10 @@ QString TorrentState::toString() const return QLatin1String("checkingDL"); case ForcedDownloading: return QLatin1String("forcedDL"); + case QueuedForChecking: + return QLatin1String("queuedForChecking"); + case CheckingResumeData: + return QLatin1String("checkingResumeData"); default: return QLatin1String("unknown"); } @@ -776,9 +780,13 @@ void TorrentHandle::updateState() case libt::torrent_status::allocating: m_state = TorrentState::Allocating; break; - case libt::torrent_status::checking_files: case libt::torrent_status::queued_for_checking: + m_state = TorrentState::QueuedForChecking; + break; case libt::torrent_status::checking_resume_data: + m_state = TorrentState::CheckingResumeData; + break; + case libt::torrent_status::checking_files: m_state = m_hasSeedStatus ? TorrentState::CheckingUploading : TorrentState::CheckingDownloading; break; case libt::torrent_status::downloading_metadata: diff --git a/src/core/bittorrent/torrenthandle.h b/src/core/bittorrent/torrenthandle.h index 84bff8416..3c998d61c 100644 --- a/src/core/bittorrent/torrenthandle.h +++ b/src/core/bittorrent/torrenthandle.h @@ -134,6 +134,9 @@ namespace BitTorrent CheckingUploading, CheckingDownloading, + QueuedForChecking, + CheckingResumeData, + PausedDownloading, PausedUploading, diff --git a/src/gui/torrentmodel.cpp b/src/gui/torrentmodel.cpp index 154905111..58fcab22f 100644 --- a/src/gui/torrentmodel.cpp +++ b/src/gui/torrentmodel.cpp @@ -333,6 +333,8 @@ QIcon getIconByState(BitTorrent::TorrentState state) return getQueuedIcon(); case BitTorrent::TorrentState::CheckingDownloading: case BitTorrent::TorrentState::CheckingUploading: + case BitTorrent::TorrentState::QueuedForChecking: + case BitTorrent::TorrentState::CheckingResumeData: return getCheckingIcon(); case BitTorrent::TorrentState::Unknown: case BitTorrent::TorrentState::Error: @@ -378,6 +380,8 @@ QColor getColorByState(BitTorrent::TorrentState state) case BitTorrent::TorrentState::QueuedUploading: case BitTorrent::TorrentState::CheckingDownloading: case BitTorrent::TorrentState::CheckingUploading: + case BitTorrent::TorrentState::QueuedForChecking: + case BitTorrent::TorrentState::CheckingResumeData: return QColor(0, 128, 128); // Teal case BitTorrent::TorrentState::Unknown: return QColor(255, 0, 0); // red diff --git a/src/gui/transferlistdelegate.cpp b/src/gui/transferlistdelegate.cpp index a426960b0..0f07ecf25 100644 --- a/src/gui/transferlistdelegate.cpp +++ b/src/gui/transferlistdelegate.cpp @@ -123,6 +123,12 @@ void TransferListDelegate::paint(QPainter * painter, const QStyleOptionViewItem case BitTorrent::TorrentState::CheckingUploading: display = tr("Checking", "Torrent local data is being checked"); break; + case BitTorrent::TorrentState::QueuedForChecking: + display = tr("Queued for checking", "i.e. torrent is queued for hash checking"); + break; + case BitTorrent::TorrentState::CheckingResumeData: + display = tr("Checking resume data", "used when loading the torrents from disk after qbt is launched. It checks the correctness of the .fastresume file. Normally it is completed in a fraction of a second, unless loading many many torrents."); + break; case BitTorrent::TorrentState::PausedDownloading: display = tr("Paused"); break;