mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
BUGFIX: Fix name of progress column in torrent content panel
This commit is contained in:
@@ -107,7 +107,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TorrentFileItem(QList<QVariant> data) {
|
TorrentFileItem(const QList<QVariant>& data) {
|
||||||
parentItem = 0;
|
parentItem = 0;
|
||||||
m_type = ROOT;
|
m_type = ROOT;
|
||||||
Q_ASSERT(data.size() == 4);
|
Q_ASSERT(data.size() == 4);
|
||||||
@@ -173,6 +173,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setProgress(qulonglong done) {
|
void setProgress(qulonglong done) {
|
||||||
|
Q_ASSERT (m_type != ROOT);
|
||||||
|
Q_ASSERT (parentItem);
|
||||||
if (getPriority() == 0) return;
|
if (getPriority() == 0) return;
|
||||||
total_done = done;
|
total_done = done;
|
||||||
qulonglong size = getSize();
|
qulonglong size = getSize();
|
||||||
@@ -184,7 +186,6 @@ public:
|
|||||||
progress = 1.;
|
progress = 1.;
|
||||||
Q_ASSERT(progress >= 0. && progress <= 1.);
|
Q_ASSERT(progress >= 0. && progress <= 1.);
|
||||||
itemData.replace(COL_PROGRESS, progress);
|
itemData.replace(COL_PROGRESS, progress);
|
||||||
if(parentItem)
|
|
||||||
parentItem->updateProgress();
|
parentItem->updateProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,6 +194,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
qreal getProgress() const {
|
qreal getProgress() const {
|
||||||
|
Q_ASSERT (m_type != ROOT);
|
||||||
if (getPriority() == 0)
|
if (getPriority() == 0)
|
||||||
return -1;
|
return -1;
|
||||||
qulonglong size = getSize();
|
qulonglong size = getSize();
|
||||||
@@ -313,7 +315,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
QVariant data(int column) const {
|
QVariant data(int column) const {
|
||||||
if(column == COL_PROGRESS)
|
if (column == COL_PROGRESS && m_type != ROOT)
|
||||||
return getProgress();
|
return getProgress();
|
||||||
return itemData.value(column);
|
return itemData.value(column);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user