From 355e7768523e0bdc1954a9dd813975157e856f5c Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 8 Jan 2011 13:48:29 +0000 Subject: [PATCH] Fix deprecation warnings --- src/qtlibtorrent/qtorrenthandle.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qtlibtorrent/qtorrenthandle.cpp b/src/qtlibtorrent/qtorrenthandle.cpp index a7f896dce..4ef956fdb 100644 --- a/src/qtlibtorrent/qtorrenthandle.cpp +++ b/src/qtlibtorrent/qtorrenthandle.cpp @@ -325,12 +325,12 @@ QStringList QTorrentHandle::uneeded_files_path() const { QDir saveDir(save_path()); QStringList res; std::vector fp = torrent_handle::file_priorities(); - vector progress; + vector progress; torrent_handle::file_progress(progress); torrent_info::file_iterator fi = torrent_handle::get_torrent_info().begin_files(); int i = 0; while(fi != torrent_handle::get_torrent_info().end_files()) { - if(fp[i] == 0 && progress[i] < 1.) + if(fp[i] == 0 && progress[i] < filesize_at(i)) res << QDir::cleanPath(saveDir.absoluteFilePath(filepath(*fi))); fi++; ++i; @@ -506,10 +506,12 @@ void QTorrentHandle::prioritize_files(const vector &files) const { if((int)files.size() != torrent_handle::get_torrent_info().num_files()) return; qDebug() << Q_FUNC_INFO; bool was_seed = is_seed(); + vector progress; + torrent_handle::file_progress(progress); torrent_handle::prioritize_files(files); for(uint i=0; i