BUGFIX: Fix name of progress column in torrent content panel

This commit is contained in:
Christophe Dumez
2012-02-21 20:27:19 +02:00
parent 7679b852b8
commit ae7e9cd1df

View File

@@ -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,7 +173,9 @@ public:
}
void setProgress(qulonglong done) {
if(getPriority() == 0) return;
Q_ASSERT (m_type != ROOT);
Q_ASSERT (parentItem);
if (getPriority() == 0) return;
total_done = done;
qulonglong size = getSize();
Q_ASSERT(total_done <= size);
@@ -184,7 +186,6 @@ public:
progress = 1.;
Q_ASSERT(progress >= 0. && progress <= 1.);
itemData.replace(COL_PROGRESS, progress);
if(parentItem)
parentItem->updateProgress();
}
@@ -193,7 +194,8 @@ public:
}
qreal getProgress() const {
if(getPriority() == 0)
Q_ASSERT (m_type != ROOT);
if (getPriority() == 0)
return -1;
qulonglong size = getSize();
if(size > 0)
@@ -313,7 +315,7 @@ public:
}
QVariant data(int column) const {
if(column == COL_PROGRESS)
if (column == COL_PROGRESS && m_type != ROOT)
return getProgress();
return itemData.value(column);
}