mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-01 00:09:06 +03:00
- Fixed a bug in torrent files filtering (closes #158846)
This commit is contained in:
parent
5bbdb9e119
commit
82e548a2fd
3 changed files with 4 additions and 0 deletions
|
@ -181,6 +181,7 @@ class PropListDelegate: public QItemDelegate {
|
||||||
// } else {
|
// } else {
|
||||||
model->setData(index, QVariant(HIGH));
|
model->setData(index, QVariant(HIGH));
|
||||||
model->setData(index, QVariant(NORMAL));
|
model->setData(index, QVariant(NORMAL));
|
||||||
|
*filteredFilesChanged = true;
|
||||||
// }
|
// }
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
|
@ -708,6 +708,7 @@ void bittorrent::loadTorrentSpeedLimits(QString hash) {
|
||||||
// Read pieces priorities from .priorities file
|
// Read pieces priorities from .priorities file
|
||||||
// and ask QTorrentHandle to consider them
|
// and ask QTorrentHandle to consider them
|
||||||
void bittorrent::loadFilesPriorities(QTorrentHandle &h) {
|
void bittorrent::loadFilesPriorities(QTorrentHandle &h) {
|
||||||
|
qDebug("Applying pieces priorities");
|
||||||
if(!h.is_valid()) {
|
if(!h.is_valid()) {
|
||||||
qDebug("/!\\ Error: Invalid handle");
|
qDebug("/!\\ Error: Invalid handle");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -304,6 +304,7 @@ bool properties::allFiltered() const {
|
||||||
|
|
||||||
|
|
||||||
void properties::getPriorities(QStandardItem *parent, int *priorities) {
|
void properties::getPriorities(QStandardItem *parent, int *priorities) {
|
||||||
|
qDebug("In getPriorities");
|
||||||
unsigned int nbRows = parent->rowCount();
|
unsigned int nbRows = parent->rowCount();
|
||||||
for(unsigned int i=0; i<nbRows; ++i){
|
for(unsigned int i=0; i<nbRows; ++i){
|
||||||
QStandardItem *item = parent->child(i, INDEX);
|
QStandardItem *item = parent->child(i, INDEX);
|
||||||
|
@ -313,6 +314,7 @@ void properties::getPriorities(QStandardItem *parent, int *priorities) {
|
||||||
} else {
|
} else {
|
||||||
item = parent->child(i, PRIORITY);
|
item = parent->child(i, PRIORITY);
|
||||||
priorities[index] = item->text().toInt();
|
priorities[index] = item->text().toInt();
|
||||||
|
qDebug("File at index %d has priority %d", index, priorities[index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue