From 8847df60e115b46cc42952f4e176fda5fc6f3f39 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 17 Apr 2011 10:36:28 +0000 Subject: [PATCH] Fix another deprecation warning with libtorrent v0.16 --- src/qtlibtorrent/qtorrenthandle.cpp | 9 +++++++++ src/qtlibtorrent/qtorrenthandle.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/qtlibtorrent/qtorrenthandle.cpp b/src/qtlibtorrent/qtorrenthandle.cpp index 12f4a62e6..b5a9c1488 100644 --- a/src/qtlibtorrent/qtorrenthandle.cpp +++ b/src/qtlibtorrent/qtorrenthandle.cpp @@ -471,6 +471,15 @@ bool QTorrentHandle::is_auto_managed() const { #endif } +bool is_sequential_download() const { +#if LIBTORRENT_VERSION_MINOR > 15 + torrent_status status = torrent_handle::status(0x0); + return status.sequential_download; +#else + return torrent_handle::is_sequential_download(); +#endif +} + qlonglong QTorrentHandle::active_time() const { #if LIBTORRENT_VERSION_MINOR > 15 return torrent_handle::status(0x0).active_time; diff --git a/src/qtlibtorrent/qtorrenthandle.h b/src/qtlibtorrent/qtorrenthandle.h index 10d9f3ef3..d957b462c 100644 --- a/src/qtlibtorrent/qtorrenthandle.h +++ b/src/qtlibtorrent/qtorrenthandle.h @@ -104,6 +104,7 @@ public: bool is_seed() const; bool is_checking() const; bool is_auto_managed() const; + bool is_sequential_download() const; qlonglong active_time() const; qlonglong seeding_time() const; QString creation_date() const;