- flush cache before file preview (libtorrent >= 0.15 only)

This commit is contained in:
Christophe Dumez 2010-01-09 21:39:17 +00:00
parent abf35a31f3
commit bd5880843f
4 changed files with 18 additions and 2 deletions

View file

@ -64,6 +64,10 @@ protected slots:
QModelIndex index;
QModelIndexList selectedIndexes = previewList->selectionModel()->selectedRows(NAME);
if(selectedIndexes.size() == 0) return;
#ifdef LIBTORRENT_0_15
// Flush data
h.flush_cache();
#endif
QString path;
foreach(index, selectedIndexes){
path = h.files_path().at(indexes.at(index.row()));