1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-09 14:27:56 +00:00

- Update torrent progress after checking (especially useful for paused torrents that are not updated otherwise)

This commit is contained in:
Christophe Dumez 2009-11-25 14:02:54 +00:00
parent c075016b51
commit f15973f2c8

View File

@ -111,6 +111,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, GUI *main_window, Bittor
connect(BTSession, SIGNAL(metadataReceived(QTorrentHandle&)), this, SLOT(updateMetadata(QTorrentHandle&))); connect(BTSession, SIGNAL(metadataReceived(QTorrentHandle&)), this, SLOT(updateMetadata(QTorrentHandle&)));
connect(BTSession, SIGNAL(pausedTorrent(QTorrentHandle&)), this, SLOT(pauseTorrent(QTorrentHandle&))); connect(BTSession, SIGNAL(pausedTorrent(QTorrentHandle&)), this, SLOT(pauseTorrent(QTorrentHandle&)));
connect(BTSession, SIGNAL(resumedTorrent(QTorrentHandle&)), this, SLOT(resumeTorrent(QTorrentHandle&))); connect(BTSession, SIGNAL(resumedTorrent(QTorrentHandle&)), this, SLOT(resumeTorrent(QTorrentHandle&)));
connect(BTSession, SIGNAL(torrentFinishedChecking(QTorrentHandle&)), this, SLOT(updateMetadata(QTorrentHandle&)));
// Listen for list events // Listen for list events
connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(torrentDoubleClicked(QModelIndex))); connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(torrentDoubleClicked(QModelIndex)));
@ -246,6 +247,7 @@ void TransferListWidget::updateMetadata(QTorrentHandle &h) {
qDebug("Updating torrent metadata in download list"); qDebug("Updating torrent metadata in download list");
listModel->setData(listModel->index(row, TR_NAME), QVariant(h.name())); listModel->setData(listModel->index(row, TR_NAME), QVariant(h.name()));
listModel->setData(listModel->index(row, TR_SIZE), QVariant((qlonglong)h.actual_size())); listModel->setData(listModel->index(row, TR_SIZE), QVariant((qlonglong)h.actual_size()));
listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)h.progress()));
} }
} }