mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Always show progress and remaining bytes for unselected files.
This commit is contained in:
parent
3e375128c0
commit
7ba66e692f
@ -84,12 +84,7 @@ void PropListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
|||||||
break;
|
break;
|
||||||
case REMAINING:
|
case REMAINING:
|
||||||
QItemDelegate::drawBackground(painter, opt, index);
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
if (index.sibling(index.row(), PRIORITY).data().toInt() == prio::IGNORED) {
|
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong()));
|
||||||
QItemDelegate::drawDisplay(painter, opt, option.rect, tr("N/A"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong()));
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case PROGRESS:
|
case PROGRESS:
|
||||||
if (index.data().toDouble() >= 0) {
|
if (index.data().toDouble() >= 0) {
|
||||||
|
@ -69,7 +69,6 @@ qulonglong TorrentContentModelItem::size() const
|
|||||||
qreal TorrentContentModelItem::progress() const
|
qreal TorrentContentModelItem::progress() const
|
||||||
{
|
{
|
||||||
Q_ASSERT(!isRootItem());
|
Q_ASSERT(!isRootItem());
|
||||||
if (m_priority == prio::IGNORED) return 0;
|
|
||||||
|
|
||||||
if (m_size > 0) return m_progress;
|
if (m_size > 0) return m_progress;
|
||||||
|
|
||||||
@ -78,10 +77,8 @@ qreal TorrentContentModelItem::progress() const
|
|||||||
|
|
||||||
qulonglong TorrentContentModelItem::remaining() const
|
qulonglong TorrentContentModelItem::remaining() const
|
||||||
{
|
{
|
||||||
Q_ASSERT(!isRootItem());
|
Q_ASSERT(!isRootItem());
|
||||||
if (m_priority == prio::IGNORED) return 0;
|
return m_remaining;
|
||||||
|
|
||||||
return m_remaining;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int TorrentContentModelItem::priority() const
|
int TorrentContentModelItem::priority() const
|
||||||
|
Loading…
Reference in New Issue
Block a user