Optimize the preview of huge torrents. Fixes issue #288.

This commit is contained in:
sledgehammer999 2012-12-26 20:00:31 +02:00
parent c8753c96db
commit b6cedbe4af

View file

@ -99,9 +99,10 @@ void PreviewSelect::on_previewButton_clicked() {
// Flush data // Flush data
h.flush_cache(); h.flush_cache();
QStringList absolute_paths(h.absolute_files_path());
QString path; QString path;
foreach (index, selectedIndexes) { foreach (index, selectedIndexes) {
path = h.absolute_files_path().at(indexes.at(index.row())); path = absolute_paths.at(indexes.at(index.row()));
// File // File
if (QFile::exists(path)) { if (QFile::exists(path)) {
emit readyToPreviewFile(path); emit readyToPreviewFile(path);