mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
BUGFIX: Fix name of progress column in torrent content panel
This commit is contained in:
parent
b1f1fbf114
commit
8f4c4e8c40
1 changed files with 5 additions and 4 deletions
|
@ -107,7 +107,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
TorrentFileItem(QList<QVariant> data) {
|
||||
TorrentFileItem(const QList<QVariant>& data) {
|
||||
parentItem = 0;
|
||||
m_type = ROOT;
|
||||
Q_ASSERT(data.size() == 4);
|
||||
|
@ -173,6 +173,7 @@ public:
|
|||
}
|
||||
|
||||
void setProgress(qulonglong done) {
|
||||
Q_ASSERT (m_type != ROOT);
|
||||
if (getPriority() == 0) return;
|
||||
total_done = done;
|
||||
qulonglong size = getSize();
|
||||
|
@ -184,8 +185,7 @@ public:
|
|||
progress = 1.;
|
||||
Q_ASSERT(progress >= 0. && progress <= 1.);
|
||||
itemData.replace(COL_PROGRESS, progress);
|
||||
if (parentItem)
|
||||
parentItem->updateProgress();
|
||||
parentItem->updateProgress();
|
||||
}
|
||||
|
||||
qulonglong getTotalDone() const {
|
||||
|
@ -193,6 +193,7 @@ public:
|
|||
}
|
||||
|
||||
qreal getProgress() const {
|
||||
Q_ASSERT (m_type != ROOT);
|
||||
if (getPriority() == 0)
|
||||
return -1;
|
||||
qulonglong size = getSize();
|
||||
|
@ -313,7 +314,7 @@ public:
|
|||
}
|
||||
|
||||
QVariant data(int column) const {
|
||||
if (column == COL_PROGRESS)
|
||||
if (column == COL_PROGRESS && m_type != ROOT)
|
||||
return getProgress();
|
||||
return itemData.value(column);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue