|
|
@ -187,11 +187,16 @@ void properties::loadFilteredFiles(){ |
|
|
|
|
|
|
|
|
|
|
|
void properties::updateProgress(){ |
|
|
|
void properties::updateProgress(){ |
|
|
|
std::vector<float> fp; |
|
|
|
std::vector<float> fp; |
|
|
|
|
|
|
|
try{ |
|
|
|
h.file_progress(fp); |
|
|
|
h.file_progress(fp); |
|
|
|
torrent_info torrentInfo = h.get_torrent_info(); |
|
|
|
torrent_info torrentInfo = h.get_torrent_info(); |
|
|
|
for(int i=0; i<torrentInfo.num_files(); ++i){ |
|
|
|
for(int i=0; i<torrentInfo.num_files(); ++i){ |
|
|
|
PropListModel->setData(PropListModel->index(i, PROGRESS), QVariant((double)fp[i])); |
|
|
|
PropListModel->setData(PropListModel->index(i, PROGRESS), QVariant((double)fp[i])); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}catch(invalid_handle e){ |
|
|
|
|
|
|
|
// torrent was removed, closing properties
|
|
|
|
|
|
|
|
close(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Set the color of a row in data model
|
|
|
|
// Set the color of a row in data model
|
|
|
|