Update torrent progress when its content changed (filtered files)

This commit is contained in:
Christophe Dumez 2007-07-31 09:25:54 +00:00
parent 99a58b9208
commit 99530728c5
4 changed files with 7 additions and 4 deletions

View file

@ -44,6 +44,7 @@
- BUGFIX: search plugin update - do not display only last version changelog
- BUGFIX: Search plugin update - fixed missing new lines in changelog
- BUGFIX: The number of search results was not reset when clicking on 'Clear' button
- BUGFIX: Update torrent progress when its content changed (filtered files)
- COSMETIC: Redesigned torrent properties a little
- COSMETIC: Redesigned options a little
- COSMETIC: Display more logs messages concerning features

1
TODO
View file

@ -47,7 +47,6 @@
- Translations update (IN PROGESS)
- Optimize and cleanup code
- add asserts to squash remaining bugs
- Update progress (as well as size) when a torrent's content hash changed (filtered files)
- Check that there is no problem with right click menu in torrent content (all files filtered for example)
- Wait for some bug fixes in libtorrent :
- upload/download limit per torrent

View file

@ -1243,14 +1243,17 @@ void GUI::showProperties(const QModelIndex &index){
torrent_handle h = BTSession->getTorrentHandle(fileHash);
properties *prop = new properties(this, BTSession, h);
connect(prop, SIGNAL(mustHaveFullAllocationMode(torrent_handle)), BTSession, SLOT(reloadTorrent(torrent_handle)));
connect(prop, SIGNAL(filteredFilesChanged(QString)), this, SLOT(updateFileSize(QString)));
connect(prop, SIGNAL(filteredFilesChanged(QString)), this, SLOT(updateFileSizeAndProgress(QString)));
prop->show();
}
void GUI::updateFileSize(QString hash){
void GUI::updateFileSizeAndProgress(QString hash){
int row = getRowFromHash(hash);
Q_ASSERT(row != -1);
DLListModel->setData(DLListModel->index(row, SIZE), QVariant((qlonglong)BTSession->torrentEffectiveSize(hash)));
torrent_handle h = BTSession->getTorrentHandle(hash);
torrent_status torrentStatus = h.status();
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)torrentStatus.progress));
}
// Set BT session configuration

View file

@ -171,7 +171,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void portListeningFailure();
void trackerAuthenticationRequired(torrent_handle& h);
void setTabText(int index, QString text);
void updateFileSize(QString hash);
void updateFileSizeAndProgress(QString hash);
void sortProgressColumnDelayed();
void addUrlSeedError(QString url, QString msg);