Optimizations to TorrentContentModel

First step to address issue #24.
This commit is contained in:
Christophe Dumez 2012-08-26 15:00:37 +03:00
parent e9d075049b
commit 30be83d445
5 changed files with 36 additions and 38 deletions

View file

@ -234,13 +234,12 @@ void PropertiesWidget::updateTorrentInfos(const QTorrentHandle& _h) {
}
}
void PropertiesWidget::loadTorrentInfos(const QTorrentHandle &_h) {
void PropertiesWidget::loadTorrentInfos(const QTorrentHandle& _h)
{
clear();
h = _h;
if (!h.is_valid()) {
clear();
if (!h.is_valid())
return;
}
try {
// Save path
@ -261,9 +260,7 @@ void PropertiesWidget::loadTorrentInfos(const QTorrentHandle &_h) {
PropListModel->model()->setupModelData(h.get_torrent_info());
filesList->setExpanded(PropListModel->index(0, 0), true);
}
} catch(invalid_handle& e) {
}
} catch(const invalid_handle& e) { }
// Load dynamic data
loadDynamicData();
}