Browse Source

- Fixed a bug in torrent files filtering (closes #158846)

adaptive-webui-19844
Christophe Dumez 17 years ago
parent
commit
82e548a2fd
  1. 1
      src/PropListDelegate.h
  2. 1
      src/bittorrent.cpp
  3. 2
      src/properties_imp.cpp

1
src/PropListDelegate.h

@ -181,6 +181,7 @@ class PropListDelegate: public QItemDelegate { @@ -181,6 +181,7 @@ class PropListDelegate: public QItemDelegate {
// } else {
model->setData(index, QVariant(HIGH));
model->setData(index, QVariant(NORMAL));
*filteredFilesChanged = true;
// }
break;
case 2:

1
src/bittorrent.cpp

@ -708,6 +708,7 @@ void bittorrent::loadTorrentSpeedLimits(QString hash) { @@ -708,6 +708,7 @@ void bittorrent::loadTorrentSpeedLimits(QString hash) {
// Read pieces priorities from .priorities file
// and ask QTorrentHandle to consider them
void bittorrent::loadFilesPriorities(QTorrentHandle &h) {
qDebug("Applying pieces priorities");
if(!h.is_valid()) {
qDebug("/!\\ Error: Invalid handle");
return;

2
src/properties_imp.cpp

@ -304,6 +304,7 @@ bool properties::allFiltered() const { @@ -304,6 +304,7 @@ bool properties::allFiltered() const {
void properties::getPriorities(QStandardItem *parent, int *priorities) {
qDebug("In getPriorities");
unsigned int nbRows = parent->rowCount();
for(unsigned int i=0; i<nbRows; ++i){
QStandardItem *item = parent->child(i, INDEX);
@ -313,6 +314,7 @@ void properties::getPriorities(QStandardItem *parent, int *priorities) { @@ -313,6 +314,7 @@ void properties::getPriorities(QStandardItem *parent, int *priorities) {
} else {
item = parent->child(i, PRIORITY);
priorities[index] = item->text().toInt();
qDebug("File at index %d has priority %d", index, priorities[index]);
}
}
}

Loading…
Cancel
Save