mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 13:58:51 +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");
|
return QLatin1String("checkingDL");
|
||||||
case ForcedDownloading:
|
case ForcedDownloading:
|
||||||
return QLatin1String("forcedDL");
|
return QLatin1String("forcedDL");
|
||||||
|
case QueuedForChecking:
|
||||||
|
return QLatin1String("queuedForChecking");
|
||||||
|
case CheckingResumeData:
|
||||||
|
return QLatin1String("checkingResumeData");
|
||||||
default:
|
default:
|
||||||
return QLatin1String("unknown");
|
return QLatin1String("unknown");
|
||||||
}
|
}
|
||||||
|
@ -776,9 +780,13 @@ void TorrentHandle::updateState()
|
||||||
case libt::torrent_status::allocating:
|
case libt::torrent_status::allocating:
|
||||||
m_state = TorrentState::Allocating;
|
m_state = TorrentState::Allocating;
|
||||||
break;
|
break;
|
||||||
case libt::torrent_status::checking_files:
|
|
||||||
case libt::torrent_status::queued_for_checking:
|
case libt::torrent_status::queued_for_checking:
|
||||||
|
m_state = TorrentState::QueuedForChecking;
|
||||||
|
break;
|
||||||
case libt::torrent_status::checking_resume_data:
|
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;
|
m_state = m_hasSeedStatus ? TorrentState::CheckingUploading : TorrentState::CheckingDownloading;
|
||||||
break;
|
break;
|
||||||
case libt::torrent_status::downloading_metadata:
|
case libt::torrent_status::downloading_metadata:
|
||||||
|
|
|
@ -134,6 +134,9 @@ namespace BitTorrent
|
||||||
CheckingUploading,
|
CheckingUploading,
|
||||||
CheckingDownloading,
|
CheckingDownloading,
|
||||||
|
|
||||||
|
QueuedForChecking,
|
||||||
|
CheckingResumeData,
|
||||||
|
|
||||||
PausedDownloading,
|
PausedDownloading,
|
||||||
PausedUploading,
|
PausedUploading,
|
||||||
|
|
||||||
|
|
|
@ -333,6 +333,8 @@ QIcon getIconByState(BitTorrent::TorrentState state)
|
||||||
return getQueuedIcon();
|
return getQueuedIcon();
|
||||||
case BitTorrent::TorrentState::CheckingDownloading:
|
case BitTorrent::TorrentState::CheckingDownloading:
|
||||||
case BitTorrent::TorrentState::CheckingUploading:
|
case BitTorrent::TorrentState::CheckingUploading:
|
||||||
|
case BitTorrent::TorrentState::QueuedForChecking:
|
||||||
|
case BitTorrent::TorrentState::CheckingResumeData:
|
||||||
return getCheckingIcon();
|
return getCheckingIcon();
|
||||||
case BitTorrent::TorrentState::Unknown:
|
case BitTorrent::TorrentState::Unknown:
|
||||||
case BitTorrent::TorrentState::Error:
|
case BitTorrent::TorrentState::Error:
|
||||||
|
@ -378,6 +380,8 @@ QColor getColorByState(BitTorrent::TorrentState state)
|
||||||
case BitTorrent::TorrentState::QueuedUploading:
|
case BitTorrent::TorrentState::QueuedUploading:
|
||||||
case BitTorrent::TorrentState::CheckingDownloading:
|
case BitTorrent::TorrentState::CheckingDownloading:
|
||||||
case BitTorrent::TorrentState::CheckingUploading:
|
case BitTorrent::TorrentState::CheckingUploading:
|
||||||
|
case BitTorrent::TorrentState::QueuedForChecking:
|
||||||
|
case BitTorrent::TorrentState::CheckingResumeData:
|
||||||
return QColor(0, 128, 128); // Teal
|
return QColor(0, 128, 128); // Teal
|
||||||
case BitTorrent::TorrentState::Unknown:
|
case BitTorrent::TorrentState::Unknown:
|
||||||
return QColor(255, 0, 0); // red
|
return QColor(255, 0, 0); // red
|
||||||
|
|
|
@ -123,6 +123,12 @@ void TransferListDelegate::paint(QPainter * painter, const QStyleOptionViewItem
|
||||||
case BitTorrent::TorrentState::CheckingUploading:
|
case BitTorrent::TorrentState::CheckingUploading:
|
||||||
display = tr("Checking", "Torrent local data is being checked");
|
display = tr("Checking", "Torrent local data is being checked");
|
||||||
break;
|
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:
|
case BitTorrent::TorrentState::PausedDownloading:
|
||||||
display = tr("Paused");
|
display = tr("Paused");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue