mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 03:06:37 +03:00
Merge pull request #3329 from glassez/state
Fix missing torrent states. Closes #3302.
This commit is contained in:
commit
2e0c3f8751
4 changed files with 22 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -134,6 +134,9 @@ namespace BitTorrent
|
|||
CheckingUploading,
|
||||
CheckingDownloading,
|
||||
|
||||
QueuedForChecking,
|
||||
CheckingResumeData,
|
||||
|
||||
PausedDownloading,
|
||||
PausedUploading,
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue